Monday, May 20, 2024
95
rated 0 times [  99] [ 4]  / answers: 1 / hits: 35784  / 11 Years ago, fri, january 17, 2014, 12:00:00

I have installed Google Tag Manager on my website, and am using it to load some Javascript onto my site. However, GTM is no longer loading, my Javascript isn't loading, and the error code is not very helpful.



Here is the GTM code on my website:



<!-- Google Tag Manager -->
<noscript><iframe src=//www.googletagmanager.com/ns.html?id=GTM-MFQ99J
height=0 width=0 style=display:none;visibility:hidden></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MFQ99J');</script>
<!-- End Google Tag Manager -->


This is the code I am including in the GTM Tag:



<!-- Qualaroo for your website -->
<!-- Paste this code right after the <body> tag on every page of your site. -->
<script type=text/javascript>
var _kiq = _kiq || [];
(function(){
setTimeout(function(){
var d = document, f = d.getElementsByTagName('script')[0], s = d.createElement('script'); s.type = 'text/javascript';
s.async = true; s.src = '//s3.amazonaws.com/ki.js/50553/aS-.js';f.parentNode.insertBefore(s, f);
}, 1);
})();
</script>


When I look at the Chrome Javascript Console, I get the message:



(x) Failed to load resource     http://www.googletagmanager.com/ns.html?id=GTM-MFQ99J


And when I reload the page, I see:



(x) GET http://www.googletagmanager.com/ns.html?id=GTM-MFQ99J    index.html:45
anonymous function index.html:45
anonymous function index.html:46


Going to these lines gets me these lines from my GTM code:



'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MFQ99J');</script>


I've been googling like crazy to try to figure this out, but I'm out of my depth for a lot of this. The error message anonymous function seems to be especially hard to search for, even within GTM and other Google support documentation.


More From » google-chrome-devtools

 Answers
14

Do you have adblock plus installed? It used to block googletagmanager.com. The errors looked just like this.



Try disabling it and refreshing the page. If that fixes it, all you need to do is update your AdBlock filters. Google and AdBlock worked this out in early 2013, so updated versions of AdBlock filters will stop blocking google tag manager.



Also, it looks like you're using Google Tag Manager to load Qualaroo surveys. Please don't bother Qualaroo's customer service with this problem; it's not their fault Google got themselves blacklisted by AdBlock.


[#73094] Thursday, January 16, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
santana

Total Points: 595
Total Questions: 94
Total Answers: 98

Location: Zambia
Member since Mon, Oct 24, 2022
2 Years ago
;