Notification

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

Container export and import

Google Tag Manager containers can be exported as JSON. Exported containers can be compared, modified, shared, stored in a version control system, and imported back into Tag Manager.

Common uses for this feature include:

  • Bulk changes to tag configurations. You can set up a new site with identical structure and tag configurations to an existing site. Export a container from the existing site and use a text editor to modify items that need to change (e.g. conversion IDs, domain names,) and then import the revised configuration file into a new container.
  • Store website configuration data in a central location. Store all your container versions in a version control system and review changes before publishing them live. 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, use container export and import for this purpose.
  • Copy new or updated components between multiple containers. A set of tags, triggers, variables, and/or templates can be exported from one container and imported into another. This can be used to distribute a set of pre-configured components to multiple containers.

Export a container

  1. In the top navigation, click Admin.
  2. In the Container section, click Export Container.
  3. Click Choose a version or workspace.
  4. Select the desired container or workspace version.
  5. Click Download.
Note: If you attempt to perform a partial export that excludes any tags, triggers, or variables that are dependencies for the items selected for export, a warning message will appear. If you choose to continue the export, references to missing tags and triggers will be removed. Variable references will be preserved.
You can also export a container from the Trash Can.

Import a container

  1. In the top navigation, click Admin.
  2. In the Container section, click Import Container.
  3. Click Choose container file and select the file that you would like to import.
  4. Select if you would like to add the imported file to a new or existing workspace.
    • To add the file to a new workspace:
      1. Under Choose workspace, click New.
      2. Enter a title and description for your workspace.
      3. Click Save.
    • To add the file to an existing workspace:
      1. Under Choose workspace, click Existing.
      2. Select the desired workspace.
  5. Select Overwrite or Merge.
    1. Overwrite 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.
    2. 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.)
  6. Click Continue. The preview dialog 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.
  7. 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
Google apps
Main menu
12784322861351536737
true
Search Help Center
true
true
true
true
true
102259
false
false