Page 1 of 1

Google Analytics trouble

Posted: Wed Mar 11, 2015 2:48 am
by donohue
Hi,

I'm using CMSMS 1.11.13 and trying to add the analytics.js code to my site, but it is not registering as being installed in Google Analytics.

Code: Select all

{literal}
< 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','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-xxxxxxxx-x', 'auto');
  ga('send', 'pageview');

< /script>
{/literal}
I'm using the Simplex template. I tried adding the code immediately before the closing < /head> tag, and also immediately before the closing < /body> tag, but neither works. It just says: "Status: Tracking Not Installed".

Can anyone help?

Thanks!!

Re: Google Analytics trouble

Posted: Wed Mar 11, 2015 8:33 am
by velden
Just check the html source of your webpage (frontend). If the code is there it should work.

Of course 'UA-xxxxxxxx-x' should contains your unique code. I assume you just replaced this for this post (?).

Re: Google Analytics trouble

Posted: Thu Mar 12, 2015 1:17 am
by donohue
Yep, I just x'd out the numbers for this post. Thanks for your reply though!!

Anyway, I think I figured it out. Apparently the "status" in Google Analytics is buggy and doesn't show the true status in real time like it leads you to believe. Everything seems to be working fine now.