Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Two GTM containers on one site: how to find and fix it

TRK-101Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Google Tag Manager (GTM) is a tool that loads your tracking tags from one place. Each account has a container with an ID like GTM-ABC1234. Your site loads a container by pasting its snippet into the page.

This issue happens when two or more container snippets are live on the same pages. It is common after an agency change: the new team adds their container, but nobody removes the old one. Sometimes the old snippet is hidden in a theme file, a plugin or a header setting.

How the duplicate happens
  1. Visitor submits formOne real lead
  2. Old agency containerSends a GA4 and Ads conversion
  3. New containerSends the same conversion again
  4. Reports and ad biddingShow two leads, data is unreliable

Both containers load on the same page and both send the same conversion.

Why it costs you leads or sales

Duplicate tags inflate your numbers. One lead is reported as two, so cost per lead looks half what it really is. Ad platforms learn from that data, so smart bidding can optimise towards a wrong signal.

Reported vs real leadsExample numbers
Reported vs real leads (example)Real leads: 100 leads; Reported with duplicate: 200 leads077153100200Real leadsReported with duplica…leads

Example: with two containers both firing the same conversion tag, 100 real leads can show up as 200 in reports.

How to check if your site has it

Find every GTM container on your site
  1. Search the page source

    Open your site, right-click and choose View page source. Search for googletagmanager.com/gtm.js and GTM-. Note every ID you find.

  2. Check the browser console

    In developer tools, open the Console and type Object.keys(google_tag_manager). It lists the container IDs loaded on the page (plus any GA4 IDs).

  3. Check the Network tab

    Reload with the Network tab open and filter by gtm.js. You should see one request per container.

  4. Use Tag Assistant

    Connect Google Tag Assistant to your site. It shows each container it finds and which tags fired in each.

  5. Compare with who owns what

    Open tagmanager.google.com and see which IDs your own account can access. An ID you cannot open belongs to someone else, often the old agency.

  6. Look for duplicate hits

    In Network, filter for collect (GA4) or conversion (Google Ads). Two identical requests for one action confirm a duplicate.

Console check: list containers on the pagejavascript
Object.keys(window.google_tag_manager || {}).filter(function (k) { return k.indexOf('GTM-') === 0; });

How to fix it

The goal is one container per site, unless you have a clear reason for two. Before you remove anything, list what the old container does so you do not switch off tracking you still need.

Consolidate to one container
  1. Get access to the old container

    Ask the former agency to add your email to the container, or to export it. If that is not possible, you can still review what it does with Tag Assistant.

  2. List its tags

    Write down each tag, its trigger and the platform it reports to (GA4, Google Ads, Meta, and so on).

  3. Decide what to keep

    Compare with the new container. Keep one version of each tag. Recreate any needed tag that only exists in the old container.

  4. Publish the new container first

    Make sure the new container has everything it needs and is published before you remove the old snippet.

  5. Remove the old snippet

    Delete the old container's snippet from where it lives. See the platform steps below.

  6. Pause the old container's tags

    If you own the old container, pause or delete its tags so nothing fires if the snippet returns.

Where to remove the old snippet
  1. Check plugins

    Look at GTM plugins, Site Kit, header and footer script plugins and SEO plugins that have a scripts field. Remove the old ID.

  2. Check the theme

    Open Appearance > Theme File Editor and look in header.php and footer.php. Use a child theme so updates do not undo your change.

Page source before and after

Two containers

  • GTM-OLD1234 and GTM-NEW5678 both load
  • Each conversion is sent twice
  • Old agency can still change what runs on your site

One container

  • Only GTM-NEW5678 loads
  • Each conversion is sent once
  • You control every tag on the site

How to confirm it's fixed

Confirm the fix
  • View source shows only one GTM- ID.
  • The console command lists a single container.
  • The Network tab shows one gtm.js request.
  • Tag Assistant lists one container and each tag fires once per action.
  • A test form submission sends one GA4 event and one Google Ads conversion.
  • Your reports show a normal lead count after a few days, with no sudden drop to zero.

How to prevent it happening again

Prevention checklist
  • Keep a written record of which container ID belongs on which site.
  • Own the container: create it in your company's Google account and give agencies access, rather than using theirs.
  • Put container removal on the agency offboarding checklist, including where the snippet lives.
  • Remove old users from the GTM account when an agency leaves.
  • Recheck page source after theme changes, plugin installs and redesigns.
  • Monitor your live site so a returning old container is noticed quickly.

How FunnelGuard handles this

FunnelGuard detects this today. When its robot visitor runs your journeys, it records the GTM container IDs it finds on the pages. If more than one ID shows up, you can see it and compare it with the container you expect.

Questions people ask

Can I have two GTM containers on the same website?

Yes, it is technically allowed, and some teams use a second container on purpose. It becomes a problem when both contain tags that do the same job, because those tags fire twice. For most small and mid-size sites, one container is simpler and safer.

Why are my GA4 conversions counted twice?

A common cause is two GTM containers, or a container plus a hard-coded gtag snippet, each sending the same event. Check the page source for more than one GTM- ID and the Network tab for two identical collect requests per action.

How do I find all the GTM container IDs on my website?

View the page source and search for GTM-, or run Object.keys(google_tag_manager) in the browser console. Google Tag Assistant also lists every container it detects on the page.

How do I remove an old agency's GTM container?

First record what its tags do and recreate any you still need in your own container. Then delete the old snippet (the head script and the body noscript) from your theme, plugin or site settings, and check the page source afterwards.

Will removing the old GTM container break my tracking?

It can if the old container holds tags you still rely on. List its tags first, rebuild the needed ones in the new container and publish it before you remove the old snippet. Then test a real conversion.

Why can't I open a GTM container that is on my site?

It probably belongs to another Google account, such as a former agency. Ask them to add your email as a user or to export the container. If they will not, you can still remove the snippet from your site.

Does a second GTM container slow down my site?

It adds another script download and any tags inside it, so it can add load time. The effect depends on what the old container still runs. Removing unused containers is a simple way to cut unneeded scripts.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: GTM ids recorded.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.