Migrating Universal Analytics Tags to GA4 via GTM
Migrating UA Tags to GA4 via GTM

๐Introduction
With Universal Analytics sunsetting, a retail client needed a complete migration of 47 UA tags to GA4 equivalents while maintaining data continuity and preserving all custom dimensions and audience segments.
โThe Problem
The client had 47 active UA tags in GTM tracking everything from page views to custom ecommerce events, scroll depth, video plays, and form submissions. A rushed migration risked data gaps and broken reporting at a critical trading period.
๐Identifying the Causes
UA and GA4 use fundamentally different event schemas. UA used event categories/actions/labels while GA4 uses a flat event + parameters model. All 47 tags needed redesign, not just copy-paste. Custom dimensions had different index mappings. Audiences defined in UA could not be directly imported.
โ ๏ธConsequences for the Business
If migrated incorrectly, the client would lose historical segmentation data, break Google Ads audiences built on UA, and enter a period of reporting blindness during their peak sales season.
โ Solution
We ran parallel tracking for 60 days with both UA and GA4 collecting data simultaneously. Created a complete tag audit spreadsheet mapping each UA tag to its GA4 equivalent. Rebuilt all custom dimensions in GA4, migrated key audiences, and set up a GA4 measurement plan document as the new source of truth.
๐Results
Migration completed with zero data gaps. All 47 tags successfully mapped and rebuilt. Historical UA data was preserved in BigQuery for trend comparison. New GA4 audiences were live and actively used in Google Ads campaigns within the 60-day parallel window.
๐Conclusion
UA to GA4 migration requires careful planning and parallel tracking. Rushing the migration risks audience gaps and reporting blind spots that can take months to recover from.
๐กKey Takeaways
Always run parallel tracking for at least 30-60 days before turning off UA. Document every tag in a migration spreadsheet. Rebuild audiences in GA4 before they are needed for campaign targeting.