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.



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="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>

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


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." : "http://www.");

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

<script type="text/javascript">


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


} catch(err) {}

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']);

(function() {

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

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

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



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']);

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

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”>

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),



ga('create', 'UA-XXXXX-Y');
ga('send', 'pageview');


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.


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.


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! 


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.


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.


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.

  • Thanks, Jordan, for this explanation. I just installed Analytics on one of my sites ( AllenBWest.com ), and I wasn’t able to view AdSense through the Analytics reporting area. Turns out I was using the Universal Tracking Code. So I’ve reverted to Asynchronous Tracking Code, and it seems to be working now. Thanks again!

    • Jordan Louis

      Hi Ted! Thanks for the comments! I appreciate your feedback, and I’m glad that I could help you out of a pickle and/or a jam.

  • Any idea of how to downgrade from universal analytics? I assume it’s just as simple as finding the old analytics and updating with your ID or does the setup of a new domain take presedence? We added a new domain into Universal Analytics and the demographic data obviously won’t work with this snippet.

    • Jakob Boyer-Dræby

      Same question enters my mind. I upgraded on a customers GA to Universal Analytics. Demographics was the reason, and we can’t track that. Had 2 days in the upgrade process where we could. Now they’re on Universal and Demographics are not there. BUMMER big time. Not a smart move for Google, make you upgrade and forget to mention that the reason you upgraded is not supported.
      Want to downgrade.

      • Jordan Louis

        Hi Jakob – sorry it’s been so long since your post. Have a look at my reply to Shad for details.

    • Jordan Louis

      You would just grab your old GA code and use your old account’s ID for data collection if you wanted to migrate back to the asynchronous GA code for remarketing, display advertising, or demographics data usage.

      Thanks for bringing the issue with Demographics to my attention – I’ll draft an update to clarify this (add it to the list with remarketing and DC.js) and add it to this post.

      • Jamie Walden

        How do I find my old GA code?

        • Jordan Louis

          Hi Jamie! You can find it by right clicking in your website, selecting View Source, and searching for “ga.js”. If the block of code has “pageTracker” in it, it’s the “Traditional” code base. If it has “gaq.push”, it’s the newer “Asynchronous” code base. If you don’t don’t anything and you suspect someone could have already upgraded it for you, search for “analytics.js” – that’s Universal Analytics.

  • “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. ”

    Does it mean that without a login the Universal analytic multi-device tracking is Useless? Most of the ecommerce sites use Guest Check -outs what about such scenarios?

    Prashant TransPacific Software

    • Jordan Louis

      Guest checkouts would be much more difficult to deal with – but if you require their e-mail address as part of the checkout process and create a hash from that to use as a unique identifier, you could still track across devices. Even better, use the e-mail address as a login when they have an account and ask for it to send them a receipt when they check out as a guest.

  • Daniel

    Hey – great post, well done.

    I’m looking for confirmation that the UA tag will work alongside the classic tag with no interference – do you have a link to Google articles confirming this? (I cant find anything)

    Thanks in advance,

  • Hey Jordan, Thanks for this detailed explanation. With Google making this migration publicly available, do you think only those with user base on desktop and smartphones should migrate to UA?

    Also, do you think Google will, sooner or later completely replace GA with this UA ? If so, is it advisable to switch right now?

    • Jordan Louis

      Once Universal Analytics is out of beta, all Google Analytics users should be migrating to Universal Analytics. The plan is to completely replace GA, but not until later this year.

      Until then, I suggest that you run UA and GA side by side, feeding the data into separate accounts just to be sure. Once UA comes out of beta, it will be much safer to run UA alone.

      • Thanks Jordan,

        I should be implementing UA along with GA as per your idea!

        Let’s see how it goes.

  • Sophia Karalis

    Hi there, will UA fix the issue of not being able to see certain data (“not set”) specifically around mobile device data on your website? Is this because of Java script issues on certain feature phones? or do we need to make changes to our tracking code?

  • James Carter

    Hi Jordan:

    I was found this while looking for specific reasons NOT to migrate.

    Are these still valid now: AdSense, Content Experiments, Display Advertising Integration & Remarketing Integration

    All do not work with universal?

  • Hi Jordan, Thanks for the detailed overview.

  • hilarityensues1

    Bad, bad, bad article. Takes far too long to get to the point, adds unimportant content to fluff up the word count and create fake authority, and then tries to get you into lead gen. What a joke.

    • Jordan Louis

      You give me too much credit – I’m just naturally verbose and thorough, and I always have been. Certainly a tendency I’ve been working to curb.

      As for lead gen – I’m sorry, but that’s the purpose of a corporate blog. That’s one of the benefits of owning your own website: generating your own leads on a platform you control.

      Free pro-tip: You could drum up some more leads for yourself if you were to use your real name and photo, I’m sure.

  • Derek

    Now that Universal Analytics is out of beta and has demographics and interests working does the issue still remain with lost traffic due to some users blocking third party cookies? If so, is there some kind of “hot swapping” technique that worked with the old dc.js that is recommended for UA?

  • Sir Sever

    Why create a new account versus upgrade???? Just toss out old data.. Not worth anything.. not! Everything else is helpful..