GTM tag works in Preview but not on the live site: how to find which of five causes it is.
- “GTM tag works in Preview but not on the live site”
- “GTM tag fires in preview mode but not live”
- “Google Tag Manager works in debug mode but not in production”
- “GTM changes not showing on live site”
- “GTM published but tag not firing”
- “GA4 tag fires in Tag Assistant but no data in reports”
- “GTM tag not firing for visitors”
- “GTM container not updating after publish”
Baris Asa, tracking consultant, London · Last checked: 21 November 2026
A GTM tag that fires in Preview but not on the live site is usually one of five things: the change was never published, the live page loads a different container, a cache is serving an old page, consent holds the tag back for real visitors, or the live URL doesn’t match the trigger. First check: in Versions, is your tag in the live version? Then compare the container ID in the live page’s gtm.js with the one you published from.Preview and the live site are not the same environment. Google’s help describes Preview as browsing the site “as if the current container draft was deployed”. The live site runs what was published. Anything between those two states is invisible while you test in Preview and decisive for everyone else.
A word on terms. Preview is GTM’s test mode: your unpublished draft, in your browser only. Published means a version has been made live for the live environment. A version is a saved snapshot of the container.
Which of the five is it?
| CAUSE | WHAT GIVES IT AWAY | FIRST CHECK |
|---|---|---|
| Never published | Preview is fine, the Versions list has no live version with your change | Versions: is your tag in the live version? |
| Different container on the page | Live page loads another GTM ID | Network tab, gtm.js |
| Cache serving an old page | Fix works for you, not for others | Private window, view source |
| Consent | Works after you accept, not before | Decline in a private window |
| Trigger doesn’t match | Preview URL differs from the live one | Trigger conditions vs real URL |
Work through them in that order. The first two are quick to check. Running Preview on the live URL (the last cause) is also a 30-second test, so do it early if you can.
Was the change ever published?
Google’s help is plain: edits in a workspace don’t affect the site until you publish them. The step that does it is the Submit button, and inside it the option called Publish and Create Version. Saving a version alone does not publish. Google says you can save the current state of a workspace as a version at any time.
Check it in the container:
- Open Versions. Find the version marked as live (Google says the Live environment always points to the version currently published) and open it. Look for your tag.
- If it is in the live version and the tag still doesn’t fire for visitors, tags can also fire and send but never reach reports: that side is in GA4 DebugView is empty. If your tag isn’t in it, go back to the workspace, Submit, choose Publish and Create Version, and publish.
- If you can edit and preview but there is no Submit option you can use, it’s permissions. Google’s help says Edit access can make edits but not create versions or publish, and Approve can create versions but not publish. Only Publish access can release. Ask whoever holds it, or ask for the level.
Two more ways to be “published but not live”:
- A custom environment. Google says publishing to a custom environment doesn’t send the change to the live version. Check which environment the Publish dialog was set to. The live site follows the Live environment.
- A later publish replaced yours. Publishing a different version makes that one live. Google says publish history shows when versions were live and who published them: check it.
Is the live page loading the container you tested?
Preview connects to the container you opened it from. The live page loads whatever ID is in its snippet. A mismatch happens: an agency’s old container, a plugin that adds its own, a staging snippet that got shipped.
On the live page, in Chrome: right-click, Inspect, Network tab, filter for gtm.js, reload. Read the id=GTM-... in the request. It must match the container you published from. With a server-side or custom first-party loader the request may not be called gtm.js: search the page source for GTM- and the loader URL instead.
- Different ID: you published to a container the site doesn’t load. Fix the snippet on the site, or publish in the right container.
- No
gtm.jsrequest at all: the snippet is missing or blocked. The checks are in GTM Preview won’t connect. Google’s Tag Assistant help lists ad blockers, browser extensions, consent tools, firewalls and a content security policy as things that can stop the container running. - Custom environment snippet on the live site: Google says each custom environment has its own snippet, to be installed on that environment’s site. If the live site carries a staging environment’s snippet, it follows that environment’s version, not the Live one.
Is a cache showing visitors an old page?
The container is fetched from Google. The page that holds the snippet is yours, and that is what a cache serves stale. Google doesn’t document this one, so treat it as what I see in practice. A CDN, a caching plugin or a theme cache can keep serving an older copy. That matters when the fix was in the page: a corrected snippet, a dataLayer push, a changed template.
Test it without guessing. Open the live URL in a private window, view the page source, and look for the change. If the source doesn’t have it, purge the cache and test again. If it’s in your source but not a colleague’s, check the CDN region, logged-in views and cached copies, in that order. Response headers such as age or x-cache in the Network tab show a cached copy.
Is consent holding the tag back for visitors?
Preview is often tested by someone who has already accepted cookies, or who accepts at the first prompt. A real visitor often hasn’t. Two things can hold a tag back.
- Consent Mode. Google’s GA4 and Google Ads tags have built-in consent checks that change what they do when consent isn’t granted. If the default consent state is set wrongly or too late, the tag behaves differently for a visitor who hasn’t answered. In Tag Assistant, select the tag, open the Consent tab in its output and read the On-page Default column. Google says that tab is empty when consent mode isn’t implemented on the page.
- A tag’s additional consent setting. Google’s help says a tag set to “Require additional consent for tag to fire” fires only if every specified consent type is granted when it’s triggered.
The test: private window, live site, decline the banner, and watch the Network tab for the GA4 collect request (Preview doesn’t need to be connected). If the tag fires only after accept, consent is the cause. That may be correct behaviour, not a fault. Whether it should fire before consent is your policy call, and Consent Mode set up properly keeps modelled conversions for visitors who decline. The consent behaviour for a Cookiebot setup is in Cookiebot and GTM Consent Mode v2, filed under F-201 .
Does the trigger match the live URL?
Preview often runs on a staging or a test URL. Tag-level settings cause the same symptom: a scheduling date range, “once per page” firing, or a variable that resolves differently live (a hostname lookup table, a cookie that exists only in your session). A trigger written against that address (“Page URL contains /staging-thanks”) never matches the real one. The same happens with a page path that differs between environments, a hostname condition, or a Click trigger whose class exists only in the theme you tested.
Open the tag in Preview on the live URL itself. In the left panel, click the event where the tag should fire, and read the trigger conditions under Tags Not Fired. The condition that failed is shown. If the conditions pass but the tag still holds back, the cause is timing and not URL: see GTM tag fires before the dataLayer is ready, filed as F-103 .
How do I fix it, in order?
- Versions: is your tag in the version marked live? If not, publish.
- Permissions and environments: can you publish, and was it published to Live?
- Network tab on the live page: does
gtm.jsload, and is the ID yours? - Private window and view source: is the page serving your change?
- Decline the banner: does the tag only fire after accept?
- Preview on the live URL: does the trigger match?
What to send whoever owns the site
The tag [name] fires in GTM Preview but not on [live URL]. The live version in container GTM-XXXX is [number], published [date]. The page loads container [ID from gtm.js]. [It does / doesn’t] fire in a private window with cookies declined. Can you [publish the change / correct the snippet / clear the cache for this template]?
If nobody on your side reads Versions and the Network tab, send me the URL and the container ID. I’ll tell you which of the five it is. I do this as a Google Tag Manager consultant.
Common questions
Why does my GTM tag fire in Preview but not on the live site?
Preview runs your workspace draft in your own browser. The live site runs the published version, for whoever opens it. So the usual causes are that the change was saved but never published, the live page loads a different container ID, a cache is serving an old page, a consent setting holds the tag back for visitors who haven’t accepted, or the trigger doesn’t match the live URL. In Versions, check that the live version contains your tag, then compare the container ID in the live page’s gtm.js with the one you published from.
Does saving a version publish it?
No. Google’s help says you can save the current state of a workspace as a version at any time, and that it is the Submit screen’s Publish and Create Version option that makes the change live. A saved version that was never published does not change the site.
Why can I preview but not publish?
Container permissions. Google’s help says Edit access can create workspaces and make edits but not create versions or publish, and Approve can create versions but not publish. Only Publish access can publish. If you can edit and preview, you may have been testing changes nobody with Publish access has released.
Can a custom environment cause this?
Yes. Google’s help says publishing to a custom environment does not send the change to the live version of the container. If the change was published to a staging environment, the live site won’t have it.
Could the cookie banner be the reason?
It is a common one. Preview is often run in a browser where you have already clicked accept. A visitor who hasn’t accepted may have the tag held back by Consent Mode or by a tag’s additional consent setting. Open the live site in a private window, decline, and compare.
Who fixes a GTM tag that only works in Preview?
Whoever holds Publish access to the container, plus a developer if the cause is the page itself (the wrong snippet, a cache). The diagnosis comes first: which of the five it is decides who has to act.
Sources
Read on 21 November 2026:
- Tag Manager Help, preview and debug containers (Preview browses the site as if the current container draft was deployed; older versions can be previewed from Versions)
- Tag Manager Help, publishing, versions and approvals (Submit, Publish and Create Version; changes in a workspace are not operational until published; a version can be saved without publishing; publish history; Publish to Environment)
- Tag Manager Help, environments (Live environment points to the currently published version; publishing to a custom environment does not send changes to live; each custom environment has its own snippet)
- Tag Manager Help, user permissions (Edit, Approve and Publish levels and what each can do)
- Tag Manager Help, consent overview (built-in consent checks; “Require additional consent for tag to fire”)
- Google for Developers, troubleshoot consent mode with Tag Assistant (Consent tab, On-page Default and On-page Update columns; empty when consent mode is not implemented)
- Tag Assistant Help, troubleshoot with Tag Assistant (ad blockers, extensions, consent tools, firewalls and CSP can block Google tags)