11 September 2024

How to remove Universal Analytics

Wood tree

In summary

  • Its time to do some governance and clean up after the turn down of Universal Analytics (UA)
  • If you haven’t done anything since it stopped working at the start of July and a year before that for users on the free offering, the code is probably still on your site and could be affecting it performance.
  • Find out Louder’s best practices on removing references to out-of-date tracking code libraries, removing your UA tags and cleaning up Google Tag Manager. You may find your website loading a bit faster.

Universal Analytics is gone, now what?

Its been a few months since Universal Analytics (UA) has been turned off. We know its no longer collecting data or doing anything useful so do we just remove the tracking code and be done with it?

The team at Louder love a good governance clean up so we’ve considered a more cautious approach that will give you some confidence when you go to clean up your old tags and UA set up.

You might find that your website speed improves as a result this spring clean.

Removing Universal Analytics

Below is a guide that will go through the key steps Louder recommends when it comes to remove Universal Analytics

  • We want to be confident that any important goals from your UA set up have been moved over to GA4.
  • Louder suggests pausing old tags and monitoring before deleting
  • Once you’re confident, you can remove the paused tags and then remove your UA tracking code

Before removing Universal Analytics

  1. Before going into Google Tag Manager (GTM), go into your Google Analytics property. Under Data Streams > Configure tag settings, check if the option ‘Collect Universal Analytics’ events is enabled.

    1. If Yes, you will need to identify if any of the UA events being transferred are valuable to your business and recreate them as GA4 events. Then deselect this feature once done.

    2. If not, you can move on.

GA4 Collect UA events setting

  1. Create a new workspace within each of your GTM containers

  2. Within the Tags section of GTM, search for “Universal Analytics” in the top right search bar. This will filter Tag type to: Google Analytics: Universal Analytics so you can see all tags that send data Universal Analytics.

  3. Prefix the name of the tag with [To be deleted] or something similar. Then pause the tags and publish the container.

  4. Monitor the performance over the next couple of weeks, if you see a loss of data elsewhere due to pausing these UA tags solve those issues, before going forward with UA’s deprecation. If not, continue with the next steps.

Complete GA4 Setup Assistant

Within GA4 administration section, navigate to the setup assistant section. Ensure that you have implemented all of the recommended setup choices, and marked them as complete. Once everything is marked as complete, you’ll stop seeing the blue reminder bar.

GA4 setup assistant

Removing Universal Analytics

Remove tags created in Google Tag Manager

After a few weeks, if you’re happy that your data has not been affected by pausing the UA tags, you can now delete the tags in GTM.

  1. Create a new workspace within each of your GTM containers
  2. Find the tags you marked for deletion, select them all and delete them.
  3. From the left hand navigation menu, click on the Variables tab. Scroll down to the User-Defined Variables section and search for “Google Analytics settings” to find variable types associated with Universal Analytics. You can delete these variables.

GTM variables settings

  1. For further clean up delete any triggers associated with the tags that were paused. You can see at a glance from the Triggers section in GTM orphaned triggers have no tags associated with them.
  2. For good measure, check in GTM debug mode that your GA4 tag is still firing.

Removing any remaining Universal Analytics code

If you cross-checked your spreadsheet of all goals included within Universal analytics, with the GTM tags labels. If there are still some UA events unaccounted for your, you may have to ask your developer team to remove the manually implemented code from their respective web pages.

The following tracking code libraries you can initially confirm them to remove are:

  1. urchin.js (believe it or not some websites still use this library and Google still hosts it!)
  2. ga.js (still hosted by Google)
  3. analytics.js

There may also be gtag.js tracking code implemented, however unlike the previous code libraries, gtag.js can be used for either UA or GA4 and as such cannot be removed at face value.

To determine if the tracking code is UA or GA4, the easiest method would be to check the tag destination ID syntax. For GA4 the syntax follows the structure G-XXXXXX, whilst the UA id follows the structure UA-XXXX-Y. As such any data prefixed by UA can be safely removed as they are UA only.

Need more help?

Get in touch with Louder if you need help with your tracking or want to get some good governance practices embedded in your measurement practice.



About Alex Byrne

Alex is a Digital Advertising Specialist at Louder. In his spare time, he enjoys reading classic novels, meditating and training at the gym.