March 17, 2018
How To Export a Part of Google Tag Manager Container
A question from the audience: How can I export a part of Google Tag Manager container? Currently, a container consists of many tags, triggers, and variables, and I just want to transfer some them to another container. When I need a complete copy of container’s assets, I use Google Tag Manager export feature. But how can I export just a part of it?
In case you didn’t know, Google Tag Manager has this really useful Import/Export functionality which is a real time saver. If you need to create an identical copy of a container, you just have to export Container A and import its content (JSON file) to the Container B.
Unfortunately, GTM always exports container in its entirety. So to answer the audience question: GTM indeed does not provide the functionality of a partial export.
A real solution
Although there’s no built-in feature, it does not mean that it’s impossible to export a part of Google Tag Manager container. In fact, there’s a 3rd-party solution waiting for you.
Just to clarify, by saying “export a part of a container” I mean that we’ll be able to clone a chosen set of tags, triggers, and variables from one GTM container to another. GTM Tools do not provide a direct export-to-JSON feature.
So if you want to literally export a part of a container to a JSON file, pick what you need from the container A (with help of GTM Tools), transfer those assets to Container B (which should be empty), and then use Google Tag Manager’s export feature.
Now, back to the main stuff. Here’s a whole process in a nutshell:
- Sign up with a Google Account to GTM Tools. This step needs to be done once.
- With help of GTM Tools, we’ll choose tags, triggers, and variables that we would like to transfer to another GTM container.
- Choose a target container.
- Voilà! Everything is now copied and ready to be used.
Go to gtmtools.com and press Sign in button.
You’ll be asked to give permissions to access various stuff in Google Tag Manager.
Press Allow. If there were any additional steps (from Google Authorization), complete them as well. Long story short, follow all steps until you will log in to GTM Tools.
Inspecting the container
Get started by clicking GTM Account dropdown in the top menu bar and choose the account from which you want to copy/export something. In my case, it’s a mysterious website called Demo.
As you probably already know, each Google Tag Manager account can have multiple containers. In the screenshot above, I had only one container, therefore I clicked the black triangle icon (1) and then chose Inspect (2).
Next, you’ll see the content of a container split into three groups, tags, triggers, and variables.
Box of each group is clickable and can be expanded, and this is exactly what we’ll do. Say, that we want to check which tags are available, click Tags.
Picking up the goods
What we’re going to do next, is “shopping”. Start adding all needed tags, triggers, and variables to the cart. You can do that by clicking on a green Plus icon located next to each container element (asset).
By the way, you can do “shopping” in multiple containers (e.g. pick a tag from container A and a trigger from container B). Later, all assets (added to the cart) will be cloned to another container.
After you’re done with picking all the goods, go to the Cart (by clicking the button in the top right corner of GTM Tools).
We’re getting close. Let’s clone everything from the cart to the target GTM container, click the green Clone to container button.
In the confirmation popup you’ll need to:
- Choose the target GTM account and container
- Choose the workspace within that GTM container.
Confirm the action by clicking Clone button.
Head over to Google Tag Manager and open the container that you have just recently exported all assets to. The easiest way to see all added tags/triggers/variables are by checking the Overview section of that container.
If needed, modify those newly added tags, triggers, and variables. This includes (but not limited to) changing Tracking IDs (e.g. Google Analytics or Facebook Pixel).
Last but not least, enable GTM Debug mode and test, test, test.
Final words on How to export a part of Google Tag Manager container
In this really quick guide, I’ve explained how to quickly export a part of Google Tag Manager container and clone all needed assets to another container. Since GTM default functionality does not involve a partial container export, Simo Ahava’s GTM Tools becomes a really handy tool.
Don’t limit yourself just to one container. You can actually pick tags/triggers/variables from multiple containers and create a new GTM Frankenstein’s monster 🙂 It’s alive!