Pablo Palazuelos
Pablo Palazuelos

Reputation: 33

Just installed Google Analytics on a wordpress and visitors are not being tracked

I added the following script to the head of all wordpress pages

<!-- Global site tag (gtag.js) - Google Analytics -->
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-74212290-1');
</script>

website is www.ice-tracks.com

is everything ok? why are visitors not being tracked?

Upvotes: 1

Views: 52

Answers (1)

zipkundan
zipkundan

Reputation: 1774

Your script is missing reference or link to googletagmanager script.

Replace your current script snippet with the following snippet.

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

After you have installed above snippet into your website you can send test traffic to your website from your analytics account.

So send the test traffic, login into your google analytics account.

  • Navigate to the "admin" section (the circular gear icon in left nav bar)
  • Select your property in the property column (center column)
  • Click on "Tracking Info" tab to expand it
  • Click on "Tracking Code" under "Tracking Info" (its the first item)
  • Clicking on "Tracking Code" will expand the right pane, there you can tracking id of your property.
  • On the right side of the tracking id you can see the button "Send Test Traffic"
  • Click on that button and your website will open in popup.

Hope this helps.

Upvotes: 1

Related Questions