Google Analytics does not work

Hi there,

yesterday I activated Google Analytics like described in the article from January 2, 2017: ‘Extension - Google Analytics’.

I copied the tracking code from Google Analytics to the extension.

Unfortunately that does not seem to work because neither the real time tracking does work nor does Google Analytics show some visitors from yesterday.

Do you have any solution for that?

Best regards

Hi there,

Can you try deactivating other plugins please and see if it functions correctly then?

I see this in the head of your site where the analytics code is injected:

</style><style id="cornerstone-custom-page-css" type="text/css"></style><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','ga');

  ga('create', 'HIDDEN', 'auto');
  ga('set', 'anonymizeIp', true);
  ga('send', 'pageview');

But it appears that the script is never run because of the text/css on the style element.

Thanks!

Was this resolved? My google analytic tag is also not working.

Hi @MichaelAnthonyMurray,

Thanks for writing around! Make sure you’re using Google Analytics extension and your code is correct. Please see https://theme.co/apex/forum/t/extension-google-analytics/84 for further assistance.

Hope this helps!

I followed the direction above and still don’t see any traffic coming to my pages. What should I try next? Can you see if my code is firing on my site? kennebell.net ?

Hi there,

We can check, you may provide your site’s URL as well. But we can’t promise any solution, I recommend contacting a developer that is familiar with Google product and services.

Thanks!

Hi There,

I can confirm that your Google Analytics code is successfully added to your site (https://prnt.sc/golykl)

Keep in mind that Google Analytics Code wont be output on your site when you’re logged-in to avoid hits.

Hope this shed some lights,
Cheers!

This was the solution for me. This info should be on the plugin settings page, naturally the first thing you do after adding your Analytics code is to check if it works on the page (not logout and then check page).
Make it an option/setting on plugin settings that can be turned on/off.

Hi @xstech,

That’s true and noted.

Thanks!

1 Like