Launch · marketers · engineers
Preview is not the published container
The most common GTM incident is 'it worked in preview' on a workspace that was never published, or published without the tag you stared at.
Publish, then a clean browser
1. Preview the workspace. 2. Submit. 3. Publish. 4. Open a clean browser with no preview cookie, no GTM debug query. 5. Confirm the collector host in Network, not only the preview panel. That last step is the one people skip. Users without the debug cookie get the published container. Shipping based on preview alone is how unpublished tags look fine.
Preview can attach to a draft or a selected version. Confirm which version you published. Agencies leave old versions. Rollbacks reintroduce Purchse. Name versions like git tags, not fix 2.
Preview fired is not Network sent
GTM preview can say a tag fired when the request was blocked, cancelled, or still queued. Ad blockers, CSP, and Consent Mode can stop the collector while preview still lists the tag. Filter Network by facebook.com/tr or /g/collect. Status 200 is the start. Then pixellint validate url on the request.
Custom HTML that injects a pixel may ignore Consent Overview. Preview shows the tag as fired. Confirm Network still respects the CMP on a fresh profile with the banner denied, then granted.
pixellint validate url @network-tr.txt --rulepack vendor/meta
pixellint validate url @network-collect.txt --rulepack vendor/google-analytics-collect
Environments and pixel ids
GTM environments exist to swap staging pixel ids and production pixel ids. Previewing production tags against a staging site (or the reverse) is how QA trains production or how prod looks empty. Use the environment share URL that matches the host. Do not hardcode a production G- tid in a constant that every environment inherits.
A loader URL still needs id: googletagmanager.com/gtm.js?id=GTM-XXXX. vendor/google-tag-manager flags a missing container id. The loader is not the hit. After it loads, you still need collect and tr in Network.
pixellint validate url 'https://www.googletagmanager.com/gtm.js?id=GTM-XXXX' --rulepack vendor/google-tag-manager
Duplicates from two installs
Base code in the theme plus GTM firing the same pixel is two PageViews. Preview may show one tag you wrote and hide the theme snippet. Network initiators will show both. Dedup event_id does not save you if both fires are PageView without a shared id. Remove one install.
SPA: a History Change trigger plus a Page View trigger on All Pages is the classic double. Preview makes this obvious if you look at the count. People look at the green mark instead.
Go-live is published plus CI
Preview does not run pixellint. Keep fixtures. After publish, capture one production URL (redacted) and one CAPI body from a staging order that uses staging ids. The weekly screenshot of preview is not a contract test.
Pixellint is not affiliated with Google. The GTM pack lints the loader. The collect and CAPI packs lint what the loader caused. Preview is a flashlight. It is not production.
Check the artifact
Paste the pixel URL or JSON body into the
playground. Same engine as
pixellint validate. Nothing leaves the tab.