Google Analytics Tracking code changes
-
Hello
I'm trying to update the google analytics code on this site, so that we can take advantage of the updated features in Google analytics.
looking at the cod on the HP I see the below code:
script type="text/rocketscript" >(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-22519110-2','auto');ga('require','displayfeatures');ga('send','pageview');
I was hoping someone could help me as I can't figure out what we've done wrong, as the current code is working for standard analytics features but not the new features, such as demographic reports etc....
Many thanks
-
Have you looked in to the fact that using rocketscript might cause Google Analytics to not fire certain events?
-
HI Martijn
Thanks for your response. To be honest I have no idea what rocketscript is... but will do a bit of research. Anything more you could tell me to help would be greatly appreciated.
Many Thanks
-
Hi,
For now that's the only thing that I saw was off from a usual implementation of the tracking code. As you're using rocketscript as the type of the tags the events might not get fired correctly.