Google Universal Analytics – Migration & Update Guide

What is Universal Analytics?

Universal Analytics is the current version of the Google Analytics software and javascript library. It’s a huge update in GA’s backend and frontend that began in 2013 and as of time of writing (August 2014) it’s already out of beta and is the recommended version of Google Analytics for all users of the services.

An easy (although not certain) way to check if your site is using the Universal Analytics library is to open the page source and search it for “analytics.js”. If it’s in the source code, then you have the latest version of the code. If you don’t find it, then most likely you are using an older version of the code. This method won’t work if you are using Google Tag Manager, obviously.

Why Should You Migrate?

I would urge most websites to upgrade to Universal Analytics as soon as possible. One of the reasons is that you would have to migrate in an year or two anyways, since Google will stop supporting ga.js and all previous library versions in about that timeframe. The more compelling reason is that the new javascript offers more functionality, ease of use, performance improvements (cookies being a big part of that) and access to all the current and future cool features that come with Universal Analytics. See the last paragraph for the coolest ones currently available.

JavaScript Code Migration/Update Checklist

At the time of writing it seems that pretty much all properties have already been upgraded to Universal Analytics automatically. If yours isn’t, you should see a “Transfer not started” blue link in the Admin section -> Property settings.

Assuming you’ve been migrated automatically or that you’ve initiated the migration manually, let’s move forward. Now you need to finish the update by updating all the Google Analytics javascript calls on your site. Remember, the fact that your property has been migrated means little until you update the code on your site as well. (you only get access to a couple of Universal Analytics features, e.g. Content Groupings). At this point it’s good to mention our Google Analytics Code Wizard tool. It can be of great help in the steps to follow.

The Main Code

You need to get the main GA snippet from the property menu – Tracking Info -> Tracking Code:

Universal Analytics Code

Then you can simply copy and paste the code in your source code, at the end of the <head> section. The code is asynchronous, just as the previous version, so it doesn’t affect page loading speed and will not halt the loading of the page in case it fails to load for some reason. Of course, this is only the “barebones” implementation, but it will work for most sites. It tracks across sub-domains automatically, unlike the previous version which required an additional variable to be set. Advanced users will want to customize their ga(‘create’) call and our wizard is a great help there.

It’s highly recommended to activate your interests & demographics reports. During the process you will receive a code piece to add to the main code.

ga('require', 'displayfeatures');

It also allows you to set up remarketing in Google Analytics (utilizing their powerful Custom Segments Remarketing lists!).

If you have been using Enhanced Link Attribution you will also need to add a line of code that GA will generate for you. It’s much more compact than the modification for the previous version.

Events

If you have a good documentation on the events that are being tracked by Google Analytics on your site, then go through each one and update it’s code. If you don’t have a documentation, select a time range of a month or two and go into your Events -> Overview report. Get the event’s category names and locate where each event is fired on your site. Replace each code piece with it’s Universal Analytics version.

Virtual Pageviews

If you are using virtual pageviews on your site, make sure to update them as well. Note that with Universal Analytics you can pass a “page” variable that contains the URL, but also a “title” variable which can contain the title of the page (useful if you use the “Page Title” report dimension). In the older version you could only pass a URL as a parameter to “_trackPageview”.

E-commerce Tracking

Make sure to update your e-commerce tracking code. I strongly urge you to consider switching to Enhanced E-commerce Tracking at this point, even if you don’t deploy all it’s functionalities right away.

Social Tracking & User Timings

Make sure that you update your social tracking codes and any custom user timing calls you are using.

Custom Variables

Custom variable support is discontinued in Universal Analytics. They are replaced by Custom Dimensions & Metrics, a more powerful solution and a bigger slot quota (20 dimensions & 20 metrics). You need to move all your custom vars to custom dimensions. A major difference is that the scope and name of each custom dimension is now controlled via the interface, you only pass the value in the javascript.

You should be all set after this!

 

New Features you SHOULD Use

Advanced Settings

First of all, you should explore all the advanced tracking settings that come with Universal Analytics. Some of the functionallities that previously required code tweaks are now moved entirely to the interface as one-click solutions. Things to mention: Referral Exclusion List, Organic Search Sources, Session Settings.

Custom Dimensions & Metrics

If you have used custom variables before, you likely need no convincing in the usefulness of custom dimensions. If you haven’t, this is the time to start using custom dimensions and metrics. Add data from your backend to help you better segment users, sessions or pageviews.

Enhanced E-commerce Tracking

An amazing improvement over the classic E-commerce tracking, this is a must for any online store/business. It features checkout funnels, statistics on product views, product list views, add to cart/remove from cart behavior, refunds and more. Check it out here.

User-ID

If your site has user that authenticate to it in some way, you’d want to deploy User-ID tracking. It’s a property-level feature that needs to be activated first by going to Tracking Info -> User-ID. You programmers will need to do some work as well in order for it to work. It’s basically a tool for cross-cookie tracking (meaning cross-device & cross-browser).

Universal Analytics User ID Device Paths

Universal Analytics User ID Device Paths

Content Grouping

Content grouping is a neat way to split your content in different logical groups. It allows statistics on the group level and an easier analysis of the user’s path through your the different sections of your site. Most of this functionality can be achieved with custom segments or custom dimensions, but content grouping has some unique features that are cool to have. Note that it works like a profile-level filter, so it only starts gathering data from the moment you set it up.

That about covers the main points you need to follow when you are migrating to Universal Analytics. Use our code update checklist with our Analytics Code Wizard tool for best results and make sure to try the new funtionalities. You can keep an eye on this page for updates on the Universal Analytics status.

About the author

Georgi Georgiev

Managing owner of Web Focus and creator of Analytics-toolkit.com, Georgi has over eighteen years of experience in online marketing, web analytics, statistics, and design of business experiments for hundreds of websites.

He is the author of the book "Statistical Methods in Online A/B Testing" and white papers on statistical analysis of A/B tests, as well as a lecturer on dozens of conferences, seminars, and courses, including as a Google Regional Trainer.

This entry was posted in Google Analytics and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

Take your user testing program to the next level with the most comprehensive book on A/B testing statistics.

Learn more