← Back to blog
GTM MIGRATION

Migrating a GTM container without losing data: the real checklist

Most GTM container migrations fail for the same reason: tags get copied from one container to another without understanding why some data wasn’t arriving in the first place. The result is a migration that drags the same problem into the new container.

The symptom: unexplained discrepancies

In a real migration project for a hospitality e-commerce, discrepancies between source and destination properties appeared right after the initial migration. The usual response, “just re-copy the tags”, fixes nothing if you don’t know why they were failing.

Audit before moving a single piece

The full container was audited: 21 tags, 64 triggers, and 177 variables. The result revealed three data-exclusion causes running in parallel, not just one:

  1. A poorly managed global toggle variable
  2. A regex blacklist with 35 exclusion IDs
  3. A blocked-sites table, completely independent from the other two

Three different systems silencing data for three different reasons, each invisible if you only glance at the container.

The migration itself

With all three causes identified, the export was done with recursive dependency resolution: verifying that every moved variable, trigger, and tag kept its reference chain intact without breaking anything during reorganization. In parallel, legacy Universal Analytics tags (already obsolete but still present and generating noise) were cleaned up.

The result

The container went from 177 to 102 variables and from 21 to 7 tags, with zero broken references: a complexity reduction of over 40% in variables without losing functionality. This wasn’t a one-off fix: it was the foundation for a project meant to scale to thousands of client containers, and a container carrying technical debt wouldn’t have held up at that scale.

The minimum checklist before migrating any container

  • Audit 100% of tags, triggers, and variables before touching anything
  • Explicitly look for duplicated exclusion logic (toggles, blacklists, external tables)
  • Resolve dependencies recursively, don’t copy-paste
  • Retire legacy inheritance (Universal Analytics and similar) in the same process
  • Validate in Preview before calling the migration done
  • Run both containers in parallel for a few days and compare event by event before the final cutover

The most expensive mistake isn’t technical, it’s process

In almost every migration project I’ve seen go wrong, the root cause wasn’t a badly moved variable — it was that nobody decided upfront how long both containers would run in parallel, or who would review discrepancies during that window. Deciding that before starting, not during, is what separates a controlled migration from one where the first person to notice the problem is a client asking why conversions dropped.


This article describes a documented real case, delivered via a digital marketing agency. End client anonymized for confidentiality.