All posts
Platform migrations

Analytics Continuity in a Migration: GA4, GTM and Conversion Tracking

An analytics migration checklist for a new website: keep GA4, GTM and conversion tracking working, verify key events on launch day and avoid broken data.

By Mehdi Hassan6 min read

The short answer

To keep analytics working through a website migration, inventory every tag and key event first, reinstall the same GA4 property and GTM container on the new site, update triggers that depend on old URLs or CSS classes, and verify each conversion in real time on launch day. Keep the same property so history stays comparable.

Key takeaways

  • Keep the same GA4 property and GTM container; a new property breaks your year-on-year comparisons.
  • Triggers tied to old URLs, page paths or CSS classes silently stop firing on a rebuilt site.
  • Check for double tagging: GTM plus a hard-coded GA4 tag counts every page view twice.
  • Verify every key event in Tag Assistant and GA4 DebugView on the live domain, not only staging.
  • Re-verify Search Console and submit the new sitemap on launch day.

Part of CMS Content Migration: How to Export, Clean and Import Content Between Platforms

How do you keep analytics working after a website migration?

You keep analytics working by moving your existing tracking setup to the new site, not rebuilding it from memory. Same GA4 property, same Google Tag Manager container, same key event names, with triggers updated wherever the new site's URLs or markup changed.

Analytics breaks in migrations for a simple reason: tracking is wired to details that change. A conversion that fires when someone reaches /thank-you stops firing when the page becomes /thanks. A click trigger tied to a button's CSS class stops working when the new build uses different classes. Nothing errors; the numbers just drop.

This checklist stays inside migration scope: what to record before, what to reinstall, and what to verify on launch day. It's one part of the wider plan in our guide to CMS content migration. For building tracking from scratch, see conversion tracking for lead-gen websites.

What does an analytics migration on a new website involve?

An analytics migration involves three jobs: documenting the current tracking, reinstalling it on the new platform, and proving it reports the same things. Most of the risk sits in the first job, because nobody can reinstall what they didn't write down.

Item

What to record

Why it breaks in a migration

GA4 property

Measurement ID and data stream

A new install creates a new property by mistake

GTM container

Container ID, tags, triggers, variables

Container snippet missing from the new templates

Key events

Names and exactly how each one fires

Triggers depend on old URLs, classes or form IDs

Ad pixels

LinkedIn, Meta, Google Ads conversion tags

Hard-coded on old pages and forgotten

Consent tool

Banner, categories, consent mode setup

Tags fire before consent, or never

Other scripts

Heatmaps, chat, session recording, CRM tracking

Left off the new site entirely

Search Console

Verification method, sitemap URL

HTML-tag verification lost with old templates

Export the GTM container as a backup before you change anything. It's a JSON file you can re-import if an edit goes wrong.

What should you do before the migration?

Before the migration, write down every key event, how it fires and what it's worth, and capture a baseline of normal numbers. The baseline is what you'll compare against when you check launch-day data.

  1. List every tag in GTM and every script hard-coded in the old site's templates and custom code settings.
  2. For each key event, note the trigger: page URL, click selector, form submission or custom event.
  3. Mark triggers that depend on things the new build will change: paths, classes, element IDs or form names.
  4. Record a baseline of daily sessions, key events and conversion rate for the last few weeks.
  5. Agree on one owner for tracking during launch week, so fixes don't wait on a hand-off.

Where you can, switch fragile triggers to sturdier ones before launch. A custom event pushed to the data layer when a form succeeds survives a redesign better than a click on a class name. This matters most for forms; our guide to migrating website forms covers the rest of that job.

How do you reinstall GA4 and GTM on the new platform?

Install the same GTM container on every page of the new site, then let GTM load GA4, rather than hard-coding GA4 separately. One loader, one source of truth.

  • Webflow. Add the GTM snippets in site-wide custom code settings, in the head and body sections.
  • Framer. Add the snippets in the site's custom code settings, which apply to every page.
  • Next.js. Load GTM in the root layout so every route includes it, and make sure client-side route changes are tracked as page views.
  • Any platform. Remove old hard-coded GA4 tags that would double-count alongside GTM.

Then update the triggers you marked earlier. Change URL conditions to the new paths, replace class-based click triggers, and point form triggers at the new forms. Publish the GTM changes in a new version with a clear name, so you can roll back. Google's Analytics Help Center documents GA4 setup if the interface has moved since you last used it.

How do you verify conversion tracking on the new website on launch day?

Verify every key event on the live domain by triggering it yourself and watching it arrive in GA4 and in each ad platform. Don't sign off on tracking from staging alone; domains, consent and cookies behave differently in production.

  1. Preview GTM on the live site

    Use Tag Assistant to connect to the live domain and confirm the container loads on every template.

  2. Walk the conversion paths

    Submit each form, start a signup and book a demo. Watch each tag fire once, not twice and not zero times.

  3. Check GA4 DebugView

    Confirm events arrive with the right names and parameters, and that page views show new paths.

  4. Test consent states

    Accept and decline the banner, and check that tags behave as your consent setup says.

  5. Check ad platform tags

    Use each platform's tag helper or test-event tool to confirm conversions register.

  6. Re-verify Search Console

    Confirm the property is still verified, submit the new sitemap and request indexing for key pages.

If the domain itself changes, also use Search Console's change of address tool. The Search Console Help Center explains when it applies.

What should you check in the first weeks after launch?

In the first weeks, compare daily numbers against your baseline and investigate any sudden step change. A drop on launch day is usually tracking; a gradual slide is more often SEO.

  • Page views double overnight. Double tagging; remove the duplicate.
  • Key events drop to near zero. A trigger still points to old URLs or selectors.
  • Self-referrals appear. A booking, checkout or auth domain needs cross-domain or referral exclusion settings.
  • Landing page report shows old paths. Cached pages or redirects; confirm redirects resolve to the new URLs.
  • Organic traffic slides. Check redirects and indexing, using our guide to why traffic drops after a website migration.
Telling a tracking problem from a real traffic problem

Compare sources that don't share your tracking code. If GA4 sessions fall but Search Console clicks hold steady, the problem is tracking. If both fall together, visitors really are missing, and the cause is probably redirects, indexing or rankings.

The same logic works for leads: if GA4 key events drop but the CRM keeps receiving the same number of form submissions, a trigger is broken, not your funnel. For a fuller recovery process after a rough launch, see our 30-day migration recovery plan.

Landing pages built for campaigns need the same care; see conversion tracking for landing pages. Migration work is scoped on the intro call, and we include redirects and SEO checks in any migration we take on.

Frequently asked questions

Will I lose my Google Analytics data when I migrate my website?
No. Your historical data lives in your GA4 property, not on the website, so it stays when the site changes. You only lose continuity if the new site reports to a different property, or if tracking is missing for a period after launch. Install the same measurement ID before launch and verify it on day one.
Do I need a new GTM container for a new website?
Usually not. Reusing the existing container keeps your tags, triggers and history of versions in one place. Update the triggers that depend on old URLs or markup, publish a new version and remove anything that only applied to the old site. A new container makes sense only when the setup is so messy that starting clean is faster.
Why did my conversions drop after the website migration?
Usually because a trigger no longer matches the new site. Key events tied to thank-you page URLs, button classes or form IDs stop firing when those change. Check whether your CRM still receives the same number of leads. If it does, fix the trigger; if it doesn't, the problem is the forms or the traffic itself.
Should I annotate the migration date in analytics?
Yes. Record the launch date wherever your team reviews data, in your reporting tool or a shared changelog, along with the dates of any big tracking fixes. Months later, someone will ask why a metric moved, and an annotation saves hours of guessing. Note redirect changes and content freezes too.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Website, $8,000.

A multi-page marketing site, designed by us, developed in Next.js and animated. $8,000, one-time, up to 6 pages. Book a free 30-minute call to see if it fits.

Schedule Call