Reputation: 33
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
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.
Hope this helps.
Upvotes: 1