• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Xenforo and Google's "Universal Analytics"

ForestForTrees

Well-known member
#1
I just received an email from Google Analytics describing a transition from "Classic Analytics" to "Universal Analytics." Universal Analytics seems to be more "universal" and powerful in that it can track people between different types of devices. It also seems to be the future. I'm not sure what it means for xF admins, though, so I thought it might be good to dedicate a thread to what it means to us. For example, do we need to update any templates? Will this give us any functionality that we actually care about?

It does seem to be the future for GA. In an article linked to from their newsletter, they write:
Universal Analytics Auto-Transfer
Our goal is to enable Universal Analytics for all Google Analytics properties. Soon all Google Analytics updates and new features will be built on top of the Universal Analytics infrastructure. To make sure all properties upgrade, Classic Analytics properties that don’t initiate a transfer will be auto-transferred to Universal Analytics in the coming months.
Here's what they say about upgrading:
Getting Started
You can upgrade your classic Google Analytics properties into Universal Analytics properties by following these two steps:

Step 1: Transfer your property from Classic to Universal Analytics.
We’ve developed a new tool to transfer your properties to Universal Analytics that we will be slowly enabling in the admin section of all accounts. In the coming weeks, look for it in your property settings.




Step 2: Re-tag with a version of the Universal Analytics tracking code.
After completing Step 1, you’ll be able to upgrade your tracking code, too. Use the analytics.js JavaScript library on your websites, and Android or iOS SDK v2.x or higher for your mobile apps.
The full article is here: http://analytics.blogspot.com/2013/10/an-easy-way-to-upgrade-to-universal_23.html

It is the "Use the analytics.js JavaScript library on your websites, and Android or iOS SDK v2.x or higher for your mobile apps." sentence that makes me think that it might be nice to have a thread about it.
 

Mouth

Well-known member
#2
I just received an email from Google Analytics describing a transition from "Classic Analytics" to "Universal Analytics." Universal Analytics seems to be more "universal" and powerful in that it can track people between different types of devices. It also seems to be the future. I'm not sure what it means for xF admins, though, so I thought it might be good to dedicate a thread to what it means to us. For example, do we need to update any templates?
After migrating to Universal, edit template google_analytics, and replace contents with:
HTML:
<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>
Will this give us any functionality that we actually care about?
Regardless, you need to take note because you will be eventually auto migrated to universal anyways by phase 2 or 3, whether you want to or not.
 

Tracy Perry

Well-known member
#5
Also... as additional info. If you use multiple styles, don't forget to update it in EVERY style you use. I forgot to (I offer 5 different styles) after changing my default to a Drift derivative. Just noticed no tracking info was being done and figured out why.