Container for Google tag manager

Deciding where to put the container in case of multi-domain websites depends on two things:

  • how independent are the domains? By this, view it from a user point of view: will a user need to navigate from one to the next seamlessly, or will this never happen?
  • how many tags are common to both?

For instance, a website with two domains in different languages managed independently will almost never have users “cross sites”, except if they’re bilingual and want to compare information within both websites. This would push to set up two different containers, one for each language domain.

However, they might be sharing a few tags such as Analytics or certain marketing tags. For this, it helps to map out which tags are already in use on both domains to see how much overlap there is.

Using Chrome with the Tag Explorer extension can give you such a result:

Here, 10 tags were fired.

Google Global Site Tag (gtag.js) works with Google Universal Analytics (analytics.js) together, the former monitoring and pushing event-related information to the second, which logs user behavior. As for the rest, it’ll take a while to learn what they’re for!