With the public release of Universal Analytics, there are now many different methods to collect data from your website with Google Analytics. The aim of this guide is to provide guidance on which of these methods is right for your organization — and when you should consider a move to Universal Analytics — by presenting a decision tree to help organizations reach the best possible outcomes for meeting their data requirements.

­

A BRIEF HISTORY OF GOOGLE ANALYTICS TRACKING CODES

Urchin Analytics

Urchin was the first iteration of the Google Analytics tracking code, named after Urchin Software Corporation; a company acquired by Google in ­­April 2005 whose software would form the basis of the first versions of Google Analytics.  Sales of Urchin were discontinued in March 2012.

Urchin had two different ways of collecting data: one was to examine web server log files, and the other was to collect data with a JavaScript tag while a visitor browsed the website.  The latter method, most relevant to our review, involved the use of several different browser cookies, and HTTP request data “piggybacked” onto a specialized GIF image to track visitor behavior on a website.

The JavaScript-based variant of Urchin, can be found on a website by viewing its source code and searching for “urchin.js”.  Users of this code should plan to upgrade to Universal Analytics immediately, and should setup a separate web property for Universal Analytics now to begin testing the new analytics in preparation for a migration.

Below is an example of a typical implementation of the Urchin Analytics tracking code:

<script src="https://www.google-analytics.com/urchin.js" type="text/javascript"></script>

<script type=”text/javascript”>
_uacct = "UA-XXXXX-X";
urchinTracker();

</script>

Google Analytics (Traditional / Synchronous)

This, the second version of the Google Analytics tracking code, was initially released in December 2007.  Like Urchin, this version of Google Analytics employed several cookies and the utm.gif image file to keep track of visitor sessions and the on-site behavior of visitors on each visit.

This variant, known to web analytics practitioners as “traditional” or “synchronous” Google Analytics, can be found on a website by viewing its source code and searching for “pageTracker” and “ga.js.”  Users of this code should begin planning for the upgrade to Universal Analytics and should consider setting up a separate web property for Universal Analytics now to begin testing the new analytics in preparation for a migration.

Below is an example of a typical application of the Google Analytics “traditional” or “synchronous” tracking code:

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "https://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>
<script type="text/javascript">

try{

var pageTracker = _gat._getTracker("UA-xxxxxx-x");

pageTracker._trackPageview();

} catch(err) {}
</script>

Google Analytics (Asynchronous)

This version of the Google Analytics tracking code, known as the “asynchronous’” tracking code, was released in December 2009.  This version of the code leveraged new methods for running different pieces of JavaScript code “out of step” or “asynchronously” with other code, rather than one piece of JavaScript code after the other, as had previously been the case.  This version, while innovative in its delivery method, still relied on the cookies and image files of its predecessors.

This variant can be found on a website by viewing its source code and searching for “gaq.push” and “ga.js.”  It is recommended that users of this code, set up a separate web property for Universal Analytics and run both versions side-by-side in preparation for a migration to Universal Analytics.

An example of a typical application of the Google Analytics “asynchronous” tracking code, placed just before the closing </head> tag on every page of a website:

<script type=”text/javascript”>

_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);

(function() {

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();

</script>

Google Analytics with Display Advertising

This version of the Google Analytics tracking code, tailored for the use of integrating with Google’s display advertising platforms within Google Analytics, was released in December 2012.

While it has support for display advertising and remarketing tracking built-in, the DoubleClick version of the Google Analytics script — because it is served by a third-party advertising server rather than the Google Analytics server — may be blocked by a visitor’s ad-blocking or do-not-track plugin.  Google has made efforts in recent months to ensure that even if the display advertising features are blocked, Google Analytics will still fire, but to help mitigate this issue even further, Cardinal Path has devised a method of finding out whether or not the DoubleClick code has been blocked, called “hot-swapping”, and then quickly substituting it with the normal Google Analytics code if that is the case.  This method allows websites to continue using the DoubleClick code to track users who permit third-party advertising cookies and servers to communicate with their web browsers, and at the same time continue collecting the usual set of Google Analytics data from visitors who have activated ad-blocking plugins or features in their browsers.

This variant can be found on a website by viewing its source code and searching for “dc.js.”  The DoubleClick code behaves and appears in all other respects just like the Google Analytics “asynchronous” tracking code and its users should proceed in the same manner, as directed above. The only difference in the code is bolded below:

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'https://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

Universal Analytics

The newest version of the Google Analytics tracking code, Universal Analytics was introduced as a public beta in March 2013 and current users will have the ability to migrate their current Web Properties to the new service very soon.

Universal Analytics dispenses with the aging tracking method used by previous iterations of Google Analytics, and instead, by default, uses a single cookie whose purpose is to assign a unique, but not personally identifying, visitor ID to the visitor’s browser.  Universal Analytics has the ability to track users across multiple devices, as long as there is a unique identifier collected on each device that would permit these separate activities to be tied together, such as a login.  Expect even more websites to look to incentivize users to login and identify themselves in some way.

Through the new Measurement Protocol, Universal Analytics has the ability to collect data from any device that is capable of connecting to the Internet and sending an HTTP data request to Google.

Now devices as diverse as game consoles, mobile phone apps, Blu-Ray players, and home DVRs can provide data on how they are being used, and that data can be collected and analyzed in the familiar Google Analytics interface or in any application that communicates with Google Analytics through the API.

Universal Analytics can be identified on a website by viewing the source code of the page and searching for its distinctive features: “i,s,o,g,r,a,m” and “analytics.js.”

An example of a typical implementation of the Universal Analytics tracking code looks like the following:

<script type=”text/javascript”>
(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-XXXXX-Y');
ga('send', 'pageview');

</script>

The ability to migrate an existing Web Property to Universal Analytics is coming soon, so if having your historic data in the same Web Property is important, you will need to wait a little bit longer before fully migrating to Universal Analytics. But, now is a good time to test Universal Analytics and deploy it alongside your existing implementation in a separate Web Property. Universal Analytics will not interfere with previous versions of Google Analytics.

Other caveats for Universal Analytics, are that it currently does not support all the features of Google Analytics.  This includes:

  • AdSense
  • Content Experiments
  • Display Advertising Integration
  • Remarketing Integration

If you are not currently using these features, then you can migrate to Universal Analytics, as soon as the migration is available, otherwise you may wish to wait until these features are released in the coming months.

STEP ONE: TAKE STOCK OF WHERE YOU ARE

Take our 10-minute online assessment to help you determine your migration preparedness and plan for a smooth transition.

Preparations for upgrading your analytics implementation present a good opportunity to look at how you can make changes to improve upon the data you are collecting.  When getting started, it is best to consult all stakeholders within your organization in order to find out what information would help them make better, data-informed decisions.  By understanding the organizational requirements, you can make an informed plan that maps out a course of action that will satisfy the informational needs of each stakeholder.  When doing so, it is also important to filter out the signal from the noise, and ensure that all of the requested data will really be useful and relevant to each stakeholder who will be receiving reports based on your digital analytics data.

It is not enough to have a metric whose increase or decrease — divorced from any connection to actual business requirements and objectives — is judged as subjectively “good” or ‘bad”, or used to determine if the performance of an employee responsible for a campaign or project is adequate.  The chosen metrics must be linked to the actual impact of organizational initiatives, whether their purpose is to spread information, engage an audience, sell goods or services, or collect donations for a cause.  To do that, the measures must be clear, objective, and transparent for them to act as conclusive and actionable proof of what strategy sinks and what strategy floats.  There must be a single version of the truth that cannot be disputed or accused of bias or favoritism.

Once these metrics, or goals, are determined, the requirements for custom data collection solutions will be clear, and those requirements can be passed to your developers for implementation.  The exact shape of that implementation will vary depending on these requirements as well as previously installed web analytics, marketing, and advertising solutions.  The most common configurations likely to be encountered on the majority of websites will be explored here, with a number of suggestions, tips, and warnings that will help ensure that your Google Analytics installation is the most current and capable available and that it won’t interfere with existing marketing or advertising services on the website.

STEP TWO: DECIDE WHICH VERSION OF GOOGLE ANALYTICS IS RIGHT FOR YOU

We all want to take advantage of the new and upcoming features available in Universal Analytics.  But this new platform is not ready for all the current GA use cases yet. Below is a decision tree intended to help identify if Universal Analytics is right for you at this time.

The first questions to ask are whether you require any of the currently unsupported features outlined in the previous section.  These include:

  • AdSense
  • Content Experiments
  • Display Advertising Integration
  • Remarketing Integration

If you require these features now, then you should hold off on fully upgrading to Universal Analytics.  But, begin planning your upgrade. You may even consider running Universal Analytics side-by-side with your existing implementation, on a separate web property to set a baseline on your existing data and to start gaining experience with some of the great features of Universal Analytics, such as Custom Dimensions and Metrics, and Dimension Widening.

Are the missing features not important to you at this time? Then proceed with the decision tree below to help guide you on the right path.

A Note About Tag Management:

If you are considering a significant update to your analytics, such as migrating to Universal Analytics, then we would highly recommend that you also consider Google Tag Manager as a method to deploy these updates.  Google Tag Manager is Google’s tag management platform, released in October 2012. Google has made significant updates to this great tool over the last year and has incorporated integrations with Google Analytics and other Google tools that ease the challenges of deploying these platforms across your digital assets. Google Tag Manager will make it easier for you to deploy other Google Analytics integrations in the future.

For those of you with an existing Google Analytics implementation that feel having a single web property contain both your historical and future data is necessary, a migration path for Universal Analytics will be available soon. But for now you will need to wait to upgrade your production web properties to Universal Analytics.  In the meantime, you can still get ready and make preparations to take full advantage of Universal Analytics.

Below are some guidelines to walk you through the decision process and give you recommendations on the approach to Universal Analytics.

1) Do you currently use Urchin Analytics? (urchin.js)

–       No: See question #2.

–       Yes: Prepare to upgrade to Universal Analytics as soon as possible. Setup a new web property for Universal Analytics and deploy a copy of your implementation with Universal Analytics. This will prepare you for the migration of your primary web property when that becomes available, and will set a baseline for data differences between the Urchin code and Universal Analytics.

2) Do you use either the Traditional/Synchronous or the Asynchronous versions of Google Analytics? (ga.js)

–       No: See question #3.

–       Yes:  Are you currently using, or do you have an immediate need for AdSense or Content Experiments?

  • Yes: Universal Analytics does not yet support these features. If you would like to begin using Universal Analytics, we recommend that you maintain your existing implementation and setup a new web property for Universal Analytics and deploy a copy of your implementation with Universal Analytics. This will prepare you for performing the migration in the future, and will allow you to set a baseline for data differences between your current code and Universal Analytics.
  • No: Maintain your existing implementation and setup a new web property for Universal Analytics and deploy a copy of your implementation with Universal Analytics to prepare for a future migration and to set a baseline for data differences between your current Google Analytics code and Universal Analytics.

3) Do you use the display advertising version of Google Analytics? (dc.js)

–       No: See question #4.

–       Yes: Display advertising features are not yet supported in Universal Analytics. We recommend that you maintain your existing installation, and setup a new web property for Universal Analytics and deploy a copy of your implementation with Universal Analytics to prepare for a future migration and to set a baseline for data differences between the Google Analytics display code and Universal Analytics. You may also consider consulting Cardinal Path about our “hot-swapping” customization to alleviate difficulties posed by visitors with ad-blockers set up.

4) Do you use Universal Analytics? (analytics.js)

–       No: You’re not using Google Analytics in any way, shape, or form?  Contact us for a free white paper describing Google Analytics and the advantages of using it for digital data collection and analysis.

–       Yes: Excellent.  You’re up to date and ready for all the great new features that Google is preparing! 

HOW TO UPGRADE TO UNIVERSAL ANALYTICS

So, you’ve answered the questions above, and are ready to begin deploying Universal Analytics. As mentioned above, when upgrading an existing implementation, it is recommended to first run Universal Analytics side by side with your existing implementation to create a baseline of data between your existing implementation and Universal Analytics.  If you do not have an existing implementation, then you can, of course, ignore this recommendation.

To get started, login into Google Analytics. In your Google Analytics Admin console, set up a new web property, and select Universal Analytics as the type. This will be the web property in which Universal Analytics will store the data it collects.

To set up Universal Analytics on your website, you will need to follow a few steps:

  1. Find and select the “Admin” button at the top-right of your Google Analytics interface.
  2. Select “Create new property” in the drop-down account selector under the heading “Property” in your Admin panel.

3. Select “Universal Analytics”, fill in the name and URL of your website, and modify your time zone if necessary, then click “Get My Tracking ID.”

4. Your new tracking ID will be provided, along with the Universal Analytics code that will need to be placed on your website.  Please place this code (or have your web developer place it) just after the opening “<body>” tag in the HTML code of every page of your website, or in the “header” template if you have a dynamically-served website or are using a content management system. 

5. For information on deploying specific features of Universal Analytics please refer to the Google Analytics developer website, or contact Cardinal Path to walk you through the process.

When you are ready to fully migrate to Universal Analytics and make it your primary tracking code, follow the guidelines below.

  1. Take note of the web property ID in the existing primary code (or in the existing web property of your Google Analytics interface) that begins with “UA” and looks like “UA-XXXXX-Y”; you will need this number later in the process.You can find the tracking ID in the middle menu of your Admin panel with the heading “Property.”  Under that heading, click “Property Settings” and you will find the tracking ID as the first entry in the information provided in the settings dialog.  As noted before, it should begin with “UA” and look like “UA-XXXXX-Y.”
  2. With that tracking ID in hand, identify the existing Google Analytics code using the guide provided earlier in this article, remove (or have your web developers remove) that code, and replace the web property ID of your Universal Analytics implementation (“UA-XXXXX-Y”) with the UA number you took note of earlier.

CONCLUSION­­

Universal Analytics opens up new opportunities for data collection, analysis, and ultimately in providing insights that will help your business grow and achieve it’s goals.

If you are a current Google Analytics user, we highly encourage you to start exploring Universal Analytics, and putting it on your plans and budget for 2014.

RELATED RESOURCES

Still on the fence about migrating to Google Universal Analytics? This article outlines six reasons why an upgrade should be a priority for your organization: Google’s Universal Analytics Two Years In: Hype or Revolution? while this one gives you 6 Reasons to Prioritize Your Move to Google Analytics (or, if you prefer to watch and listen instead of reading, here’s the webinar).

Wondering if you’re ready to make the leap to Universal Analytics? Take the Universal Analytics Migration self-assessment and read our solution sheet.

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.