Google Analytics trouble

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
donohue
New Member
New Member
Posts: 4
Joined: Wed Mar 11, 2015 2:31 am

Google Analytics trouble

Post 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!!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Google Analytics trouble

Post 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 (?).
donohue
New Member
New Member
Posts: 4
Joined: Wed Mar 11, 2015 2:31 am

Re: Google Analytics trouble

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”