Moshe1010
Well-known member
Google claims they've changed their analytic code with Universal Analytics.
Since Google's code is implemented in XenForo, I'm wondering if I can upgrade to Universal Analytics and it would still work?
From their website:
https://developers.google.com/analytics/devguides/collection/upgrade/
https://developers.google.com/analytics/devguides/collection/upgrade/guide
Or do I need to edit google_analytics and replace it with:
?
Since Google's code is implemented in XenForo, I'm wondering if I can upgrade to Universal Analytics and it would still work?
From their website:
Step 2: Update your Tracking Code (optional)
After your property has been transferred to Universal Analytics, you can start using the new tracking libraries and protocols, like analytics.js, Mobile SDK v2.x or higher, and the Measurement Protocol. Although this step is optional, you only get the full benefits of Universal Analytics after you implement the new tracking code.
https://developers.google.com/analytics/devguides/collection/upgrade/
https://developers.google.com/analytics/devguides/collection/upgrade/guide
Or do I need to edit google_analytics and replace it with:
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}">
<!-- Google Analytics -->
<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', '{$xenOptions.googleAnalyticsWebPropertyId}', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</xen:if>