2

Is it possible to use both Google Classic Analytics (ga.js) and Universal Analytics (analytics.js) with a single Google Analytics property?

I have a few related sites that share a Google Analytics property, but upgrading the tracking code on them must be done at different times (potentially months apart).

The property was created using Google Classic Analytics (a few years ago), however I've upgraded the property to be compatible with Google Universal Analytics within the Google Analytics admin portal.


The Universal Analytics Upgrade Center makes a few generic statements that lead me to believe that the property can continue receiving data from both scripts. For example:

  • When the transfer is completed, the property is ready to receive data from Universal Analytics tracking code.
  • The time it takes to update your tracking code will vary depending on your current implementation and your tracking needs.
  • When this step is completed, you will have access to the full benefits of Universal Analytics, including new reports and features.
  • Although updating your tracking code is optional at this time, you won't have access to the all of the benefits until you update your tracking code to a Universal Analytics tracking code...
  • Legacy libraries, like ga.js or v1.x of the Mobile SDKs, will be supported until Phase 4 of Universal Analytics Upgrade, at which time they will be deprecated.

Additionally, this hints that it may be possible if the actual feature-set used are not changed:

  • Custom dimensions are the new custom variables in analytics.js

The features that I'm using are limited to PageViews and Event Tracking (no eCommerce).


It's clear that after a property has been transferred/upgraded to be compatible with Google Universal Analytics, that the older script / legacy libraries (e.g., ga.js) will continue to work for some time. What is not clear is whether they will work when used simultaneously and what the repercussions are.

Ideally, all sites would be upgraded simultaneously to ensure the most consistent data, but it's simply not possible for this circumstance unless I wait and upgrade them all together much further in the future.

2

Is it possible to use both Google Classic Analytics (ga.js) and Universal Analytics (analytics.js) with a single Google Analytics property?

Yes, both will continue to work for the same property after it's transferred to Universal Analtyics (until ga.js is phased out).

As suggested in your bullet points and indicated here:

Step 1: Transfer Property
...
Step 2: Update Tracking Code (strongly recommended)
We strongly recommend you complete Step 2 so you can ensure the highest data quality in your account and get all the benefits of the Universal Analytics Upgrade. Although updating your tracking code (Step 2) is optional at this time...

Google doesn't expect webmasters to update every single page in a site (some are in the millions) to contain only the new analytics.js in one shot. Transferring the property to Universal Analtyics therefore allows it work for both while you update your pages.

The features that I'm using are limited to PageViews and Event Tracking (no eCommerce).

When you replace the basic ga.js snippet with analytics.js, just be sure to remove the basic snippet to avoid overcounting pageviews in your reports, as covered here. Providing that you have either just ga.js or analytics.js in a single page, you should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.