Google Analytics code is not tracking

Posted in: Newspaper
Post count: 60

Google analytics is not tracking. I entered the code here. https://www.awesomescreenshot.com/image/3549073/cc4a6516c2f9282e2c4fe757fc451434. Here’s the full code with the GA ID x’d out

<script>
(function(i,s,o,g,r,a,m)
{i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
Date();a=s.createElement(o),m=s.getElementsByTagName(o)
[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’
https://www.google-analytics.com/analytics.js&#8217;,’ga’);

ga(‘create’, ‘UA-XXXXXXXX-1’, ‘auto’);
ga(‘send’, ‘pageview’);
</script>

I am getting the following errors under Inspect/Console:
Uncaught SyntaxError: Invalid or unexpected token
logo.png:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
1.jpg:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
(index):3186 Uncaught ReferenceError: ga is not defined
at HTMLImageElement.onload ((index):3186)

Post count: 23312

Hello,

You should use the Google Analytics code. Please check the following useful guide from here -> https://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/ -> https://support.google.com/analytics/answer/1008080?hl=en
The Analitycs Code should have to be added here -> https://www.screencast.com/t/fc7l4hGXv Ensure that you are using the latest version of the theme via FTP way, clear all the caches and check the results.

Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.