Notification

G Suite is now Google Workspace: everything your business needs to get work done.

[V2] Exporting and Importing Containers

Learn more about the new features in Google Tag Manager V2!

Exported containers can be compared, modified, shared, stored in a version control system and imported back into Google Tag Manager. Containers are exported as JSON text files. You can replicate a container setup by exporting the container and then importing the file into a different container. Or you can modify the exported file to include only a subset of the triggers, tags and variables before importing it. By exporting and importing containers, you can create and re-use container templates and share Google Tag Manager implementations with others.

Here are two examples of how you might use this feature.

  • Make bulk changes to tag configurations. Let's say that you want set up a new site whose structure and tag configuration is identical to an existing site, but for which a few details – such as conversion IDs and domain names – are different. Instead of recreating the container from scratch, you can export a container from the existing site, use a text editor to find and replace the conversion IDs and domain names, and then import the revised configuration file into a new container.
  • Store all website configuration data in a central location. You might want to store all your container versions in a version control system and review changes before publishing them live. Google Tag Manager maintains its own version history, but if your workflow makes use of text-based tools such as diff and Git for change management, you can use container exporting and importing for this purpose.

Exporting and Importing

To export a container:

  1. In Google Tag Manager, navigate to the desired container.
  2. In the top navigation, go to Admin → Export Container.
  3. Select the desired container version from the selector.
  4. Preview and confirm your export file and click Download.

To import a container:

  1. In Google Tag Manager, navigate to the desired container.
  2. In the top navigation, go to Admin → Import Container.
  3. Select the desired container file using the selector.
  4. Select Overwrite or Merge.
    • Overwriting the existing container will remove all your existing tags, triggers and variables, and will replace them with those in the imported container. A new container version will be created before the import.
    • To Merge, select whether you want to overwrite or rename conflicting variables, triggers and tags.
      • Overwrite conflicting tags, triggers and variables: If a variable, tag, or trigger in the new container has the same name but the contents are different, overwrite the old one with the new one. (If the contents are the same, there is no conflict.)
      • Rename conflicting tags, triggers, and variables: if a variable, tag, or trigger in the new container has the same name but the contents are different, rename the new one. (If the contents are the same, there is no conflict.)
  5. Click Continue. The preview dialogue shows how many tags, triggers and variables will be added, modified or deleted. Click View Detailed Changes to see a list of all the items that will be affected.
  6. Once you are satisfied with the changes that will be made, click Confirm.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
2780375544472799741
true
Search Help Centre
true
true
true
true
true
102259
false
false