Jump to content

Google Analytics


Recommended Posts

How do you install Universal analytic in PS 1.5?

My understanding is there is a new tracking code so the std GA module PS uses doesn't work correctly.

I assumed it would be as easy as adding the script into the header.tpl pr footer but the page doesn't render at all. 

 

Any one managed to install Universal analytics and it works correctly?

Link to comment
Share on other sites

Thanks for that, I didn't 'forget' the literal tags I just had know idea I was meant to use them!

Page renders fine now, but not showing up any real time stats currently. I'll report back later if it worked fully.

 

Cheers for your help.

Link to comment
Share on other sites

  • 2 weeks later...

I just switched to the new Universal Analytics.  I added my ID to the google analytics module 1.4.3 in PS 1.5.6.1 & that is seen OK.

 

Am I right to assume I also need to add the correct version of the below into a header.tpl 









{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-000000-0', 'blah-blah.com');
  ga('send', 'pageview');

</script>
{/literal}

Which header.tpl exactly?   :rolleyes:

 

Thanks in advance.

Edited by jcmil (see edit history)
Link to comment
Share on other sites

somewhere between <header></header> tags 

 

Thanks for the reply, I meant which header.tpl, there are a fair few of them dotted about...

Only the tpl in ganalytics? Sorry if that sounds dumb!

Not sure which tpl covers everything that Google wants to look at. :unsure:

Link to comment
Share on other sites

×
×
  • Create New...