The thing about Google Tag Manager is that it allows you to re-use tags, triggers and variables created by allowing them to be exported and imported within GTM containers. You can replicate a container setup by exporting the container and then import 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 reuse container templates and share Google Tag Manager implementations with others.
If you were wondering how you can go about importing and exporting containers in GTM, here is what you can do. :. First login to your tag manager account. From the accounts page, select the container you want to import/export.
How to export container?
Once you select the desired container, navigate to admin → Export Container
Next, choose the desired version of the container.
Finally, preview and confirm ‘export container’.
How to import container?
Select your desired container which you want to import and navigate to admin -> Import Container
Here you will see multiple options, whether you want to create a new workspace or use existing and if you want to overwrite merge the containers.
Import Container Options:
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.
Merge If you want to combine the existing container with new stuff this is your best bet. You have to decide if you’re going to rename conflicting variables, triggers and tags or overwrite them.
You can overwrite conflicting tags if a variable in the new container has the same name but has different content. This would involve you overwriting the old one with the new. If everything (name and content) is the same, there will be no conflict.
Likewise, if you want to rename conflicting tags, you can rename the new one in case they have the same name but different content.
After you’re done, click Continue. The preview dialog will show you the number of tags, triggers and variables that have been added, modified, or deleted. You can also click on View Detailed Changes to get a list of everything that will change. When you think you’re done, you can click on Confirm.
Why am I not seeing the import container option?
If you can’t see the import container option, it is likely that you don’t have the edit access to the container.
What information would be in the container file?
The container file would be a JSON file containing tags, triggers and variables. Someone may send you this file or you would have downloaded to upload for other use.
Container imports are a great way to create reusable tags and maintain best practices across GTM accounts. They can also be used to get ready made tags from experts. For example here are a few containers we have created.
Some great containers created by other smart folks:
Add tools to GTM container to help store and remove cookies.
Adds engagement time tracking to every page on your site and send events to Google Analytics.
Adds automatic scroll tracking to every page on your site and send events to Google Analytics.
You can simply download them and follow instructions above to import these configurations to your account, no sweat needed.
Importing and exporting a container file is a great way to share and receive settings that are useful. While importing container is a painless process for the users who are not familiar with creating tags/triggers/variables by themselves. This makes GTM a lot more painless and powerful tool that has made the things a lot easier than it was before.
I am an Analytics Specialist focusing on nitty and gritty of google analytics and google tag manager. I have been working with digital analytics for a year, so try to write about topics that focus on fundamentals of using the tools.
I am a keen follower of technology and then last Micorsoft supporter in a sea of Apple fanboys at MarketLytics. May I stay steadfast in my beliefs! 🙂