If you have multiple websites and want to install Google Tag Manager on them, you may be wondering how many containers you need.
The answer depends on the similarity of the Google Tag Manager setups for each website. Let’s examine the scenarios in which using a single GTM container is appropriate and when utilizing multiple GTM containers is more suitable.
Using Multiple GTM Containers for Multiple Websites
For example, if you have two websites, business1.com and business2.com, and the first website is set up to track page views, purchases, and scroll events, while the second website is set up to track page views, form submissions, menu clicks, and banner clicks, it’s recommended to have two separate containers.
The person running Google Tag Manager might wonder if they should have one container for the entire company or multiple containers for each website. If two websites belong to the same business but have different tracking setups, having two separate containers is preferred. This way, if one website is using Google Analytics and Facebook Ads, while the other website is only using Google Analytics, the trigger conditions will not become complex.
If you have one container, you will need to make sure the Facebook pixel tag only fires on business2.com and not on any other pages, which could make your trigger conditions more complex. With two separate containers, you can easily set the Facebook pixel to fire on all pages of business2.com and not worry about it accidentally firing on business1.com.
Another example could be two different subdomains. Let’s say we have website.com and there are two different subdomains: a blog and an e-commerce website (blog.website.com shop.website.com).
Their structures are different and the things that will be tracked are also different. On the e-commerce website, they will focus more on e-commerce actions such as add to cart, purchases, and checkouts.
On the blog, they will focus more on content consumption, lead generation, form submissions, and clicks. So, even though they are different subdomains of the same domain, it is still recommend to use separate Google Tag Manager containers.
Using One GTM Container for Multiple Websites
However, there may be some situations where there are different domains and websites, but they are very similar.
For example, there is one website in English for the English market, and another in German with the same content, translated. In this case, if both websites track the same things, such as page views, sales, and form submissions, and use similar marketing and analytics tools, like Google Analytics, Google Ads, and Facebook Pixel, it is recommend recommend to use the same Google Tag Manager container. This will make it easier, even though you have two separate domains.
It may be enough to use one Google Analytics tag to send data to either the English or German property.
In the Google Tag Manager container, which is used on the German version of the website and the English version of the website we can create one Google Analytics 4 configuration tag for both websites. But we decided to create separate Google Analytics properties.
To configure the container so that the English website’s data is sent to the English Google Analytics, and the German website’s data is sent to the German Google Analytics property, it’s fairly easy to do. We don’t need to make a copy of each tag for each language. With one tag, we can handle this.
We must make the “GA4 Configuration” tag , so it applies to multiple domains, and in the measurement ID field we use a lookup table instead of just entering the plain ID.
We add a new variable, named “GA measurement IDs”, and select the “page hostname” as the input variable.
If the website hostname is “www.website.com”, it will send to one property, and if it’s “website.de”, it will send to another property.
This tag should still fire on all pages, but depending on where it fires, it will select the correct measurement ID. If it fires on the English version, it will use the English property ID, and if it fires on the German website, it will use the German website ID.
This is very convenient because if we decide to add a new tag in the future, such as tracking menu clicks, we will only need to create one tag, and it will cover all websites.
Now let’s go back to the final example. If you have two different sub-domains, one of which is the main website and the other is a blog, and you plan to track similar things such as page views, scrolling, and link clicks, you can use the same container.
Technically, you can also use separate containers, but the management process will become more difficult and time-consuming. Configuration tag installation is detailed describe in your article:
Simplifying GA4 Setup in GTM for Main Domain and Subdomains.
Let’s look at the advantages of each option.
One GTM container for multiple domains
Advantages:
- One change applies to multiple websites
- You can publish tags on multiple websites with several clicks
Disadvantages:
- Some unwanted tags of domain1.com might fire on domain2.com
- You must be more careful with trigger conditions, exclusions
- You might reach the max 200kb size of the container faster
Multiple GTM containers for multiple domains
Advantages:
- Easier to fire a tag just on X domain
- Tags (specific to domain1.com) will not fire on domain2.com
- The size of a single container will be smaller
Disadvantages:
- It takes more time to publish a tag on all websites
- Copy-pasting similar configuration is a tedious work
In conclusion, there is no perfect solution and each option has its advantages and disadvantages. The final decision on the number of GTM containers to use depends on you.