October 21, 2020
Multiple installations of Google Tag Manager detected by Tag Assistant: What to do?
Updated: October 21st, 2020
“Multiple installations of Google Tag Manager” – says Tag Assistant. This is a fairly common “issue” noticed in online communities. The reason why I surrounded the word issue with quotation marks is that usually, this warning is no issue at all.
Here’s what I’m talking about:
What looks really concerning in the screenshot above is the fact that the same container is added multiple times to the same page. At least Google Tag Assistant says so. But you’re probably pretty sure that the GTM container is added only once. So what the heck?
What is going on?
Update: the recent update of the Google Tag Manager Preview mode on October 16th, 2020 is not causing this as well. I have added an additional chapter at the end of this blog post
So if you’re seeing a message that Multiple installations of Google Tag Manager are detected and their IDs are actually the same, I have a hunch that you’re working on a Single Page Application.
If yes, then most likely, there is nothing to worry about (but just to double-check, continue reading).
Unfortunately, Google Tag Assistant is quite buggy when it comes to debugging Single Page Applications. Even though only one GTM container is installed, Tag Assistant may display multiple container instances as the app loads or a visitor continues to browse. This does not happen on ALL single-page applications but is quite often nonetheless.
What should you do?
To verify whether you actually have multiple installations of Google Tag Manager, check network requests in browser’s developer tools. In this demo (and as always), I’ll be using Google Chrome.
In the top right corner, click 3 dots, then go to More tools > Developer Tools.
Switch to Network tab and in the search field enter “gtm.js” (without quotation marks), keep All selected, and refresh the page.
After the page has reloaded, take a look at how many gtm.js do you see?
If one, you’re good to go. Just ignore Tag Assistant’s warning about multiple installations.
IMPORTANT: You should do this verification when you have disabled Google Tag Manager’s preview mode. If you see multiple gtm.js requests only when the preview mode is enabled, jump to the next chapter of this blog post.
If on the other hand, you see multiple gtm.js (while having the preview mode disabled), this means that there certainly are multiple GTM container snippets loaded on a page. Is that expected? Was it intended to have multiple containers on the same page?
Have a discussion about that with someone who might know the project/website you’re currently working on. Even though it isn’t optimal to use multiple GTM containers, it is possible. You can learn more about this here.
If nobody intended to have multiple containers on the same site, just remove one that shouldn’t be there (or ask someone to do that).
Multiple requests because of GTM Preview Mode
If you have enabled Google Tag Manager’s preview mode, you will be seeing two gtm.js requests in the network tab or in Tag Assistant Chrome Extension. Also, if you have some gtag() codes on your site (or Google Analytics 4), you will see their duplicate requests as well.
But don’t worry, this is expected. If you see two gtm.js requests for the same container (you can see that by looking at GTM-……) but the 2nd request contains gtm_debug=x, it’s fine.
The 2nd request is needed for the preview mode to work and it does not affect your tags or data quality. The same applies to Google Analytics requests coming from gtag(). If you see more than expected requests and some of them have the gtm_debug=x parameter, this is needed just for the preview mode.
If you exited the preview mode and refreshed the page, you’d see that 2nd request is gone.
Hopefully, one day Google will update the Tag Assistant Chrome extension to ignore the 2nd request. But I am not sure if/when this would happen.
Multiple installations of Google Tag Manager – Final words
To sum up, if you see this error in the Google Tag Assistant Chrome extension and you’re working on a single page application, most likely this error is just a Tag Assistant’s bug. For some reason, the extension doesn’t play very well with SPAs.
Also, you might see that error if you have enabled GTM’s preview and debug mode.
To make sure that the website is indeed using just a single GTM container, check requests in the browser’s developer tools.