Search code examples
google-analyticsmigrationgoogle-analytics-4universal-analytics

For a GA4 property connected to UA, do I have to change the code on the website from UA- to G-ZZZ


I'm a frontend dev tasked often with the "send instructions" link from GA, that contains >no< info whatsoever for which property or website is it about :D

What I can't find in here, or in the 12 pages of google documentation I've read, is the part of "reusable code". Right now, the migration process is basically creating a GA4 property and linking it to UA, right? And it starts working. Great. But the implementation I've been given is still a gtag + UA-ZZZ. Question is: after the six-months grace period following 01.07.2023, will I have to also change the UA-ZZZ to G-ZZZ, or will the gtag continue working with the UA-key, although GA3(UA) will not receive/process data anymore?


Solution

  • Your UA tags, if linked to a GA4 property, will continue to work and process data after the July 1, 2024 shut down of all UA properties.

    "For Google Analytics 4 properties that rely on Universal Analytics tagging for data collection, there is no additional risk when those Universal Analytics properties are shut down and deleted by Google. Once Google deletes your Universal Analytics property we’ll automatically continue to use your Universal Analytics tagging for your Google Analytics 4 property, however only if your UA tags are still on your website. If you decide to remove your UA tags, you can replace them with a Google tag."

    Source, and more info: https://support.google.com/analytics/answer/11583528?hl=en#export&zippy=%2Chow-can-i-export-data-from-my-universal-analytics-property

    However, you may want to switch to GA4 (G-XXXXX) tags for a few reasons:

    1. Features: The linked UAL property pushes UAL analytics and events into their corresponding GA4 elements. To get the most out of GA4 features you need to use the GA4 tags.
    2. Maintainability: After July 1, 2024, all old UA properties will disappear from the Analytics interface. The analytics property code will not match any remaining properties, and may confuse developers down the road.
    3. Risk Mitigation: If someone else on your team deletes the old UAL property, assuming it to be EOL, the link will be severed and your GA4 property will experience a data gap until the new code is in place.