How to export and import containers in Google Tag Manager (2026)

To export a Google Tag Manager container, go to Admin → Export Container, choose a version or workspace, select what to include and click Download: you get a JSON file. To import it, go to Admin → Import Container, choose the file, pick a new or existing workspace, choose Merge or Overwrite, review the changes and click Confirm. Nothing reaches your site until you publish.
Moving tracking between accounts or rebuilding a messy container? I do Tag Manager setups and clean-ups for businesses that run ads. Get in touch about Tag Manager.
Why export or import a container?
Exporting turns a container’s configuration into a file you can store, compare, edit or load somewhere else. The uses I see most:
- Backups. Tag Manager keeps every published version, but a JSON file in your own storage survives a lost account or a deleted container.
- Moving to another account. You can’t move a container between Tag Manager accounts. When a business changes agency or consolidates accounts, you export from the old container and import into a new one.
- Templates for new sites. An agency can build a standard setup once (Google tag, conversion events, click and form triggers, variables) and import it into each new client’s container.
- Copying part of a setup. Export only the tags, triggers and variables for one feature, such as call tracking, and merge them into another container.
- Web and server containers. Both can be exported and imported. Import a file into a container of the same type: a web container’s export goes into a web container, a server container’s into a server container. If you’re considering a server container, read server-side tagging with Google Tag Manager: is it worth it? first.
- Version control and review. A JSON file can be compared line by line with an earlier export to see exactly what changed.
What the file contains (and what it doesn’t)
The export is a JSON file of the container’s configuration: tags, triggers, variables and custom templates, along with the folders they sit in and which built-in variables are switched on. A partial export contains only the items you selected.
It doesn’t carry anything outside that configuration: user access and permissions, environments, the container’s ID and account, and of course no data. The receiving container keeps its own ID; everything inside the imported items (measurement IDs, conversion IDs, pixel IDs) comes across exactly as it was in the source.
How to export a container
- In Tag Manager, open the container and click Admin in the top navigation.
- In the Container column, click Export Container.
- Click Choose a version or workspace and select what to export. Pick the live (published) version for a backup of what’s actually on the site, or a workspace if you want unpublished changes too.
- Tick the items to include. Everything is selected by default; untick items for a partial export.
- Click Download. The browser saves a
.jsonfile.
If you leave out an item that a selected item depends on (for example a trigger used by a tag you selected), Tag Manager warns you. If you go ahead anyway, references to the missing tags and triggers are removed from the export, while references to missing variables stay. That’s how broken tags happen, so either include the dependencies or know you’ll recreate them.
Name the file with the site, container and date (“acme-web-GTM-XXXX-2026-11-15.json”) so you can find the right one later.
How to import a container
- Open the container you’re importing into and click Admin.
- In the Container column, click Import Container.
- Click Choose container file and select the JSON file.
- Choose a workspace:
- New: give it a name and description (“Import from old account”) and click Save. This is what I use almost every time, because it keeps the import separate from any work in progress.
- Existing: select a workspace that already exists.
- Choose Overwrite or Merge (explained below). With Merge, also choose Overwrite conflicting or Rename conflicting.
- Click Continue. Tag Manager shows how many tags, triggers and variables will be added, modified and deleted.
- Click View Detailed Changes and read the list. This is your last chance to catch a mistake before it’s in the workspace.
- Click Confirm.
The import lands in the workspace only. Test it in Preview, then Submit and publish when you’re happy.
Merge or Overwrite?
| Option | What happens | When to use it |
|---|---|---|
| Overwrite | Every existing tag, trigger and variable in the workspace is removed and replaced by the file’s contents. Tag Manager creates a container version before the import. | An empty new container, or restoring a full backup |
| Merge → Rename conflicting | New items are added. Where an item has the same name but different contents, the existing one is kept and the imported one is renamed. | Adding a setup to a container that already has work in it |
| Merge → Overwrite conflicting | New items are added. Where names clash with different contents, the imported item replaces the existing one. | Deliberately updating items you know are older versions of the same thing |
A “conflict” means the same name with different contents. Identical items aren’t conflicts and aren’t duplicated.
My default is Merge → Rename conflicting into a new workspace. It can’t destroy anything, and the renamed items show you exactly where the two setups disagree. Then I delete what’s redundant. Overwrite is right for an empty container; on a live container, it removes everything not in the file, including tags someone added last week.
What to check before you publish an import
- IDs inside tags and variables. The GA4 measurement ID, the Google Ads conversion ID and label, the Meta pixel ID, any CallRail or CRM IDs. If the file came from a template or another business’s container, these must be changed. If you use Constant variables for IDs, you only change them in one place.
- Hostname and path conditions. Triggers and exceptions written for another domain (Page Hostname equals oldsite.com) silently stop matching on the new site.
- Duplicates of what’s already on the site. If the receiving site already loads GA4 or the Google tag outside Tag Manager, an imported Google tag doubles it. Google Tag Manager vs the Google tag (gtag.js) explains how to check.
- Consent. Imported tags keep their own consent settings (under each tag’s Advanced Settings → Consent Settings), but the cookie banner tag and its Consent Initialization trigger have to fit the new site. If you serve visitors in the EEA or UK, check that default consent is set before the Google tag fires; see Consent Mode v2 with Google Tag Manager.
- Triggers. Click and form triggers depend on the page’s markup. A trigger on “Click ID equals cta-button” won’t fire on a site where that button has a different ID. If you’re not sure which trigger type a setup needs, my guide to every Google Tag Manager trigger type covers them all.
- Built-in variables. Make sure the ones your triggers use (Click Text, Form ID, Page Path) are enabled in the receiving container.
- Test in Preview on the real site: every important tag fires once, on the right event, with the right ID.
Common mistakes I see
- Overwrite on a live container. Someone imports a “standard setup” with Overwrite, and the client’s existing conversion tags, remarketing tags and cookie banner disappear on the next publish. There’s a version from before the import, so it’s recoverable, but only if someone notices.
- Importing straight into the Default Workspace while other changes are in progress there, so the next person to publish ships half-finished work along with the import.
- A template’s IDs left in place. Leads from the new site get counted in the template’s GA4 property or in another client’s Google Ads account.
- Partial exports with missing triggers. The tags import without triggers, can’t fire, and nobody notices because the import “worked”.
- Thinking export moves access. Users and permissions don’t come with the file. Add people to the new container separately.
FAQ
Can I move a container to another Tag Manager account?
Not directly. Create a container in the new account, export the old one and import the file. Then install the new container’s snippet on the site and remove the old one, or the two will run side by side.
Does importing a container publish it?
No. An import only changes a workspace. Your site doesn’t change until you publish a version from that workspace.
Can I undo an import?
Before publishing, delete the workspace (or the imported items). After publishing, go to Versions and publish the version from before the import. With Overwrite, Tag Manager creates a version before the import, so there’s always one to go back to.
Can I export only some tags?
Yes. On the export screen, select only the items you need. Include the triggers and variables those tags use, or the export will be missing pieces.
Can I import a web container into a server container?
No. They’re different container types with different building blocks (a server container has clients; a web container doesn’t). Import each file into a container of the same type.
Need help with your Tag Manager containers?
Moving a container, merging two setups or turning one good setup into a template is quick when it’s planned and painful when it isn’t. I do it with a review of every ID and trigger, and test before anything is published. Ask me for a conversion tracking review.


