Skip to content

Guide 123 · Container · GA4 + Tag Manager

Export and import a container, and watch its size: merge versus overwrite, and the reported 200 KB limit

Checked 11 November 2026 · Verification: container fragment validated structurally (22 checks, all passed) · Steps traced to Tag Manager Help, opened 11 November 2026 · 6-minute read

A container is a JSON file, and Tag Manager lets you take it out and put it back: export a version to store it, compare it, or copy it to another container, and import a file to replace or merge with what is there. Google's export and import page lists the uses — bulk changes, storing versions in version control, copying components between containers — and spells out the two import modes: Overwrite removes everything and replaces it, Merge keeps what exists and asks what to do with conflicts. The same file is also how you check the container's size: the widely reported hard limit is 200 KB, and Google's size page shows a warning once the container passes 70 percent of it. This guide exports, imports, and measures.

Expected signal

After step 4, the import preview dialog lists how many tags, triggers and variables will be added, modified or deleted — and the exported file's size in bytes tells you where the container sits against the reported 200 KB limit.

Download the container fragment: the export and import fragment (JSON) (export format version 2, 2116 bytes, MD5 f9a1579a2e71720d40b688064ba7280e). It holds the worked example's container state — 3 tags and 2 triggers — and is the file the export step in this guide downloads. The file is a hand-built import template, validated structurally — it was not exported from a live container.

What you need

  • A container worth copying or backing up. The worked example exports the container from the publish guide: 3 tags, 2 triggers, 0 variables — 3 + 2 + 0 = 5 items in all.
  • Admin access to the container. Export and import live under Admin, in the Container column. Read access can see the container but cannot export or import it.
  • An import choice made before you start. Overwrite or Merge, and for Merge, whether conflicts are overwritten or renamed. The choice is made during the import, not after.

The trace

  1. Export: Admin, then Export Container, then pick a version and Download. In the top navigation, click Admin. In the Container section, click Export Container. Click Choose a version or workspace, select the version, and click Download. The file is JSON, and it can be compared, modified, shared, or stored in version control. A partial export that excludes a dependency warns you first: if you continue, references to missing tags and triggers are removed, while variable references are preserved.
  2. Measure the file: the container's size is the file's size. The exported JSON for the worked example is small, but a real container grows with every tag. The widely reported hard limit is 200 KB, which is 200 × 1,024 = 204,800 bytes. Google's Versions page shows a size indicator and suggests optimizing once the container passes 70 percent of the limit: 204,800 × 70 ÷ 100 = 143,360 bytes, which is 143,360 ÷ 1,024 = 140 KB. Past the reported 200 KB cap, Tag Manager refuses to create a new version — the draft can be edited, but it cannot be published until the size comes down.
  3. Import: Admin, then Import Container, then choose the file. Click Admin, then Import Container in the Container section, then Choose container file and select the JSON file. Then choose the workspace: New, with a title and description, or Existing, with the workspace picked from the list.
  4. Choose Overwrite or Merge — and for Merge, choose how conflicts are handled. Overwrite removes all your existing tags, triggers and variables and replaces them with those in the file; a new container version is created before the import, so the old state is still recoverable. Merge keeps what exists: for a name that exists in both with different contents, pick Overwrite conflicting tags, triggers, and variables to replace the old with the new, or Rename conflicting tags, triggers, and variables to keep both. If the contents are the same, there is no conflict either way. The preview dialog then shows how many items will be added, modified or deleted — click View Detailed Changes to see the list — and Confirm runs the import.

Dead ends

DEAD END — OVERWRITE WITHOUT A BACKUP. Overwrite removes everything in the container and replaces it. The import creates a version first, so the old state is recoverable — but only if someone knows to look for it. Export the current container before you import, so the backup is a file you hold, not a version you have to find.

DEAD END — MERGE WITH RENAME, TWICE. Merging the same file twice with Rename creates a second copy of every conflicting item, each with a new name. Merge the same file twice with Overwrite instead, and the second merge finds identical contents and no conflicts at all.

DEAD END — A CONTAINER THAT GREW ONE TAG AT A TIME. A container reaches the reported 200 KB cap gradually, and the warning at 70 percent — 140 KB — is the moment to act. Deleted tags leave their triggers and variables behind, so the file keeps growing after the tags are gone. The fix is variables, lookup tables and fewer tags, not a bigger limit.

End state

One exported file held as a backup, one import run in the chosen mode, and the container's size known in bytes against the 204,800-byte limit. The container is now portable: the same file can seed a second site, live in version control, or restore this one.

Sources

Checked 11 November 2026. The click paths above are the ones in Google's help pages, opened 11 November 2026. No step in this guide was run inside a live Analytics property or a live Tag Manager container, because both need a Google sign-in and this site does not sign in as anyone. The container file was validated structurally instead: export format version 2, every tag's firing trigger resolves, every variable the tags reference exists in the file, and the tag types are the documented ones. Google moves menu items without warning; if a path on this page no longer matches, the linked help page is the current map. The container fragment for this guide is 2116 bytes (2.07 KB, 1.03% of the reported 200 KB container size limit), MD5 f9a1579a2e71720d40b688064ba7280e, and passed 22 structural checks.