Saturday, December 9, 2023
No menu items!
HomeData Analytics and VisualizationHow to Move Google Tag Manager Container to Another Account

How to Move Google Tag Manager Container to Another Account

There might be some situations where you want to move the Google Tag Manager container to another account. Maybe your company was acquired or maybe your agency created a container in their account and now you want to have the ownership under your own account.

Unfortunately, there is no simple way for that where this could be done in several clicks. However, there are workarounds. And in this blog post, I will explain that.

P.S. I presume that you want to move the web container from one account to another.



First, let’s do a quick overview of the terminology (so that you and I are on the same page). In Google Tag Manager, an account usually means a business/company. If a company has multiple websites, it still makes sense to have just one account.

In that account, you can have multiple containers. In many cases, one website means one container (but there are some exceptions).

So when I say “move Google Tag Manager container to another account”, I mean this:


If you just want to switch the administrators of the account

If on the other hand, you mean “removing one user as an administrator from the account and making another user an admin”, things are much easier.

Just log in to your GTM account (if you are the administrator of the GTM account), then go to Admin > User Management (in the Account column) and click on the user you wish to make an administrator.

Then click the checkbox next to Administrator, save changes.

Done, this user is now the administrator. Admins of accounts can add/remove other administrators. The original admin (who created the container) can also be removed from the account.

Anyway, let’s go back to the main topic – moving the container to another account.


Move Google Tag Manager container to another account

As I have said at the beginning of this blog post, there is no built-in quick “move” option in Google Tag Manager. The process of moving the container to another account looks like this:

Export your current container (you’ll get a file that contains all tags, triggers, variables, templates) but the container ID will be different
Create a new GTM Container
Import the file in the new container (the one that you exported)
Publish the new container
Ask a developer to change the container ID on your website (from the old one to the new one)

Let’s take a look at each step closer.


#1. Export the container

Go to your current container > Admin > Export Container.

Select your current workspace (if there are no changes).

If there are changes, then it might make sense to select the latest published version. Consult about this with other coworkers who work with GTM in your company. Doing uncoordinated migration might result in your coworker’s container changes not being published/migrated.

When you select the workspace, by default, all items will be selected. Keep those checkboxes that way. Click Export.

This way, you will get a .json file. You will need it later.


#2. Create a new Google Tag Manager container

Go to the list of all your Google Tag Manager accounts. It can be done by clicking this:

Then click three dots in the account to which you want to “move” the container. Click Create container.

Then enter all the information GTM asks you.


#3. Import the container file

In this new Google Tag Manager container, go to Admin > Import Container.

Choose the container file (and select the .json file you have exported in step #1).

Select existing workspace.

Keep the Overwrite option. Since this is a completely new container, we don’t have to worry about overwriting any current changes (because there are none).

At the bottom of the window, you will see the list of all items that will be imported.

Click Confirm.


#4. Publish the container

Do this step if the code of the new container is not added to the source code of the website.

You can publish all the changes in the container by clicking the SUBMIT button in the top right corner and then complete all the other steps that the user interface asks you to do.


#5. Switch from the old container on your website to the new one

This step is different for various websites and it depends on how Google Tag Manager is installed on your website.

If a developer installed GTM, then ask him/her to replace the container ID of the old container with the new one. You can find the new container ID next to the Preview button of the GTM interface.
If you installed GTM via a plugin or in some other way, then you’ll need to change the ID yourself.

Don’t change anything else in the GTM container JavaScript snippet. Both containers (the old and the new one) use the same code. The only thing that’s different is the container ID.

Once all of these steps are completed in this exact order, your new container (from the other GTM account) will start working and will send data to the same tools like GA, etc.)


Will this kind of migration affect my historic data in Google Analytics?



Will this kind of migration affect my new incoming data in Google Analytics?

Usually, no. If you did everything correctly and there are no weird hardcoded quirks on your website, then this migration process should not cause any interruptions in your data collection.


What if I don’t have the access to the original container that I want to move?

Then things get much more complicated. All previous steps required having access to the old container (so that you could export the json file). But if you don’t have access to that (e.g. the agency that created your container went rogue), then you will need to scrape the container from the website and recreate all items in your new container.

To do this, you will need a new GTM container (to which you will import the items).

Then you should go to and enter the ID of the container of which access you lost. Click Lookup container.

Then click Export in the top right corner and then click Download JSON. This will export the content of the container you have defined. However, there are some limitations (keep reading).

Then complete steps #3, #4, and #5 from this blog post.


Limitations of this approach with GTM spy

The names of tags/triggers/variables will not be available. Thus when you import all the items, you will need to manually rename them one by one. That is the limitation of Google Tag Manager. To keep things minimal, item names are not available in the downloadable gtm.js file.

It looks like GTM spy does not support custom templates too, thus they will not be recovered. Since this is a free side-project of one of the GTM users, you should not expect it to be constantly updated.

I know that Project Andromeda also has a similar feature. Maybe they support custom templates (try reaching out to them).


Final words

Even though there is no simple “move Google Tag Manager container to another account” feature in GTM, this still can be achieved (by exporting and importing the container).

As long as you have access to the original container, this will take you no more than 15 minutes before you ask a developer to change the container ID in the source code.

If on the other hand, you lost access to the original container, things get much more complicated and limited. You might try to use the GTM spy or Project Andromeda.

The post How to Move Google Tag Manager Container to Another Account appeared first on Analytics Mania.

Read MoreAnalytics Mania



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments