How to Upgrade Your Tracking to Universal Analytics

Written by Intern - 14 Apr 2015

Universal Analytics is the latest version of web analytics from Google and has become the new operating standard for processing your analytics data.

The full version was released in April 2014 and has since been adapted by all our clients and many other businesses on the web. Universal Analytics (UA) is still Google Analytics (GA) – just the code and processing method will change.

Universal Analytics changes the way the data is processed, it allows you to collect more types of data and improve the quality of your data. However the user interface in GA will remain the same.

You will need to swap over to Universal Analytics sooner or later in order to get any new updates or features and to ensure you continue to track your website data in the long run.

But upgrading to Universal Analytics isn’t a quick job. In this post I will talk you through the process you need to follow to replace the code on your site.

Why has Google changed to Universal Analytics?

Over the years GA has had several iterations of tracking code and Universal Analytics is just the latest version. Previous versions include:

  • Urchin
  • Synchronous
  • Asynchronous

Each of the above versions has had its own method to send data to GA:

  • urchinTracker
  • pageTracker
  • _gaq.push

Universal Analytics will also have its own method to send data to GA: ‘ga(‘send’)’

The change to Universal Analytics provides improved data processing, new collection methods and more analysis tools. Universal Analytics has a ton of benefits that should be considered. The easiest way to think about it is like getting an iOS update for your iPhone.

Google intends to make Universal Analytics the processing standard for all web properties, at which point no other forms of GA code will be supported.

Most properties are already processing data through Universal Analytics but you need to update all your tracking code to implement Universal Analytics completely. Universal Analytics uses analytics.js, when you upgrade to Universal Analytics you will need to change the tracking code across your site for each of your web properties.

The roll out of Universal Analytics is already on phase three out of four. Phase four will be when Universal Analytics is the operating standard for all GA accounts. Once this happens, Google will only process your data for up to two years, after that your website data will no longer be processed.

Now is a good time to think about upgrading to Universal Analytics.

Check if your GA web property has been upgraded to Universal Analytics

One of the first things you will need to do when upgrading your GA account is check if the GA web property you use to track your website has been upgraded to Universal Analytics. Most properties have already been upgraded but there are a few that haven’t. Any new web properties created since April 2014 will be Universal Analytics properties.

If you haven’t upgraded your web property to Universal Analytics you should see the following message at the top of your GA user interface:

universal analytics upgrade message

You can easily check if your property has already transferred, by looking in the admin section for the property:

  • The image below shows a property that has been upgraded to Universal Analytics

universal analytics transfer complete

  • The image below shows a property that hasn’t been upgraded to Universal Analytics

universal analytics transfer not started message

If your property has not been upgraded, you will first need to transfer the property to Universal Analytics. Once that is complete you will then need to upgrade your site tracking code (explained below).

If your web property has already been upgraded to Universal Analytics don’t worry this doesn’t break anything and your current code will continue to work and track all the things it used to.

Top tip: Universal Analytics processing is applied at the property level, this means each of your web properties and the code for each site relating to those properties need to be upgraded.

 Upgrading your tracking code to Universal Analytics

Once a web property has been migrated (you need to upgrade each web property), the tracking code on your site needs updating in order for you to benefit from any of the new features that come with Universal Analytics.

All of the GA code on your site will need to be replaced by Universal Analytics tracking code. You will need to create an implementation plan to ensure you cover all the GA tracking features you already use, including event tracking, ecommerce tracking and custom variables etc.

If you haven’t already done so it is worth considering moving your tracking code over to Google Tag Manager (GTM) at the same time, this will considerably streamline any future tracking changes and save development time and cost.

GTM is Google’s free tag management tool that allows you to quickly update tags on your site without having to rely on development time or schedules. Using a tag management system such as GTM helps to ensure that tagging onsite becomes more accurate and consistent and most tagging tasks can be done through an online interface. If you are not familiar with GTM, you can read more about it here.

Run Universal Analytics in parallel with your current GA setup

The best way to try out Universal Analytics is to run it in parallel with your classic Google Analytics Tracking Code (GATC) for around three to four weeks.

To do this you will need to create a new property within GA to track the data. This will allow you to analyse how your data looks when processed via Universal Analytics. It will also allow you to identify any differences and to test and tweak your configuration settings to ensure all additional tracking features are working.

Universal Analytics changessession handling from the classic GATC and will often report higher figures than the classic GATC. This is because Universal Analytics handles sessions differently and all visits via a referral will always start a new session – this includes visits returning to your site from a payment gateway.

To get around this issue you can add payment gateways or other legitimate sites to the referral exclusion list from within the administration section of the user interface. Your data within Universal Analytics should become more accurate due to its improved tracking.

Create an implementation plan

Before you begin to implement Universal Analytics you need to know what your current configuration looks like and if you have any additional tracking that you wish to carry across to ensure your migration is as successful as possible.

Below is a list of some additional tracking you may have that you will need to make a plan for:

  • Ecommerce tracking
  • Cross domain tracking
  • Event tracking
  • Call tracking
  • Any tracking based on virtual page views
  • Custom variables
  • Any third party tracking that relies on GA cookies (especially shopping cart solutions)

Because Universal Analytics uses a different syntax to Classic GA, all of the above will need to have the code updated to the Universal Analytics syntax manually.

Top tip: Make sure you document all the data you are currently tracking as this will enable you to diagnose tracking issues and identify any gaps you may have in your Universal Analytics data.

Customise your configuration to ensure data accuracy

Universal Analytics allows you to configure some settings from within the GA admin interface that were previously managed via code changes.

By default, all referrals trigger new sessions through Universal Analytics. This can affect the number of sessions you see in your analytics reports, especially if your visitors hop between domains while on their user journey.

For example, a visitor arriving on Freshegg.co.uk from Fresheggdigital.com.au will trigger a new session on the .co.uk site. If they move back to the .com.au site it will trigger another new session for .com.au. This can quickly inflate metrics, especially if moving between domains is common place throughout the user journey.

Referring domains that should not start a new session can be added to the ‘Referral Exclusion List’ – this will assign the session back to its original campaign/source.

referral exclusion universal analytics

You can also use this interface to customise organic search sources. Any search engine that does not appear in Google’s default search engine list will appear in your referral traffic.

So, if you have traffic from search engines polluting your referral traffic you can add them through the admin interface by clicking on ‘Organic Search Sources’. You can then add the search engine name and the query parameter.

referral traffic universal analytics

 

Top tip: To find out if organic search engines are polluting your referral traffic simply filter the results for entries containing 'search' in your referral traffic report:

search for search universal analytics

Comparing your data sets

Once all the tracking has been set up, including customisations, and the configurations have been amended, you should start to see data being tracked in terms of visitor numbers and event tracking etc. in pretty much the same way as your classic GA property.

When you are confident that all tracking is working, allow a minimum of three weeks to collect data before comparing your setups in detail. Ensure you select the raw data views for the comparison to ensure that you are comparing like-for-like. No data should be excluded through the use of filters or referral exclusion list etc.

When comparing the two data sets, you want them to match as closely as possible. Your traffic data (users, sessions etc.) from GA and Universal Analytics will never exactly match number by number. This is because data is collected and processed differently.

But you will need to look for any big discrepancies between the two. Google offers guidance that a discrepancy below 5% for any metric is an acceptable variance. If you do have metrics showing higher discrepancies, it’s time to dive into the data and your tracking configuration to find the cause for that discrepancy.

We use a basic table built in excel to quickly compare metrics and calculate the difference between Universal tracking and classic GA. You can, of course, add any additional key metrics and conversions to this table.

comparing data sets universal analytics

Table to help compare your classic GA with Universal Analytics

If Fresh Egg finds variances greater than 5% for any of the above, we will usually investigate in more detail to try and identify the source of the discrepancy. You should expect to see a difference for ‘% New Sessions’ between the two if your Universal Analytics test property is new – almost all visitors will be new visitors.

In the chart above, you can see that there is an issue where the referral traffic processed through Universal Analytics is much higher. Remember that all visits arriving via a referral will always start a new session. The percentage of new sessions to your new UA test property is likely to be much higher than that of the existing implementation because it’s new – almost every visitor is a new visitor.

Drilling down into discrepancies can be a laborious task and the reasons are not always immediately obvious. There could be an issue with your new UA tracking code but the problem could also lie with your existing configuration. Having confidence in the integrity of your current setup is helpful at this stage but do not rule out an issue with it entirely. You should aim to resolve all major discrepancies or to at least identify their cause so you can make an informed decision on whether or not it’s a problem.

Fully migrate to Universal Analytics

Once you are happy that you have configured your set up correctly and that Universal Analytics is tracking your site as you expect, you are ready to fully migrate to Universal Analytics.

You will need to swap the property tracking ID from the Universal Analytics test property that you set up to your main reporting property tracking ID. This will allow you to keep the new Universal Analytics implementation, as well as historical data collected so far in your web property in GA. You must also remove all the old ‘ga.js’ tracking code from the site.

Top Tip: If you do not remove the old code from the site you will start double-counting all of your data.

How we do it at Fresh Egg

fresh egg universal analytics migration flow

To make things a little easier for you, here is the process flow that the insights team at Fresh Egg follows during any Universal Analytics upgrade.

It includes all major considerations around the migration process, such as GTM, and verifying your data has integrity before starting the upgrade. Please let us know in the comments below if you find this process helpful or if you’re following a different method.

What next?

Now you have upgraded to Universal Analytics, this is a great time to identify any gaps that you have in your tracking to help you make better data informed decisions.

Universal Analytics offers a wide range of additional tracking features, including custom dimensions and metrics. And the new Measurement Protocol gives Universal Analytics the ability to track users across multiple devices and it can also collect data from any device that is capable of connecting to the Internet and sending an HTTP data request to Google.

Before adding any new tracking to your reporting view we would highly recommend that you create and maintain a test view in the reporting property. This test view will be used solely for testing new tracking code or filters etc. before they are added to the reporting view. This will ensure that your reporting data remains unaffected if the tracking doesn’t quite work.

We would always recommend that any new tracking is in line with your measurement plan, as this will ensure that your analytics setup is fully customised to allow you to report on your top line objectives. If you don’t have a measurement plan in place you should get one – read our blog post 'How to create a measurement plan' or get in touch.

Do you trust your GA data? Can you get all the information from GA that you need to make important decisions on advertising, conversion optimisation and content creation?

Get in touch to talk to us about the challenges you face and how we can help you to get the most out of GA. Alternatively why not check out our Google Analytics and Google Tag Manager training courses.