Felix
Felix

Reputation: 2661

Script loading failure from googletagmanager

So I added google analytics to my site, and the code snippet that google gave me was this:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-124075233-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-124075233-1');
</script>

So I added it to my <head>, but now I'm receiving the error:

Loading failed for the with source “https://www.googletagmanager.com/gtag/js?id=UA-124075233-1”.

I'm a bit confused as to why this is happening.

Upvotes: 25

Views: 24370

Answers (5)

Fabio G. Silva
Fabio G. Silva

Reputation: 1

I had the same problem with a user, but here was blocking also zendesk plugin.

He was using Adguard, disabling this app started to work again.

Check if you has any adblock component in your machine.

Upvotes: 0

tjysdsg
tjysdsg

Reputation: 756

Another thing to check is your adblocker. I used v2rayn for my proxy and blocked some ad sites, and somehow googletagmanager.com was one of them.

Upvotes: 0

Anime no Sekai
Anime no Sekai

Reputation: 190

I had the same issue but basically it's just because you're using a tracker blocker (like Ghostery). If you're using one, you will probably see this message in more than just your website. Try to whitelist your site and see if it works well

Upvotes: 1

Ali.azimi
Ali.azimi

Reputation: 103

Please check your code, where do you put that code? are you using cms like WordPress? it's possible you put in the wrong place, for example, you put that code between <?php tag

Upvotes: 0

zacaway
zacaway

Reputation: 386

I had the same problem. It turned out to be the DuckDuckGo Privacy Essentials browser extension that I was using was blocking the Google tracker request. Just disabling this extension for the site resolved the problem.

I suggest checking to see if you have a similar browser extension that is blocking the request.

Upvotes: 37

Related Questions