Guide 119 · Container · GA4 + Tag Manager
Test a workspace in Preview mode: see what fires before anyone else does
Preview is the step between building and publishing: it runs your workspace draft as if it were published, in your browser only, so you can see what fires before the live site changes. Google's preview page says preview and debug mode lets you browse a site on which your container code is implemented as if the current container draft was deployed, so you can test a container configuration before it is published. Tag Assistant is the debug view: it lists which tags fired and in which order, for each event. The worked example previews a workspace with 3 tags and reads the result.
After step 3, the debug view shows 3 events on the first page load — Consent Initialization, Initialization and Page View — and the worked example's 3 tags listed under Tags Fired on the events they belong to, with 1 tag under Tags Not Fired that was never meant to fire on that page.
Download the container fragment: the Preview mode fragment (JSON) (export format version 2, 2741 bytes, MD5 43d3d630789c6673d77f564f782b1334). It holds the worked example's 4 tags — 3 that fire on the homepage and 1 newsletter tag that does not — so the Preview read has something to show. The file is a hand-built import template, validated structurally — it was not exported from a live container.
What you need
- A workspace with changes to test. Preview runs the current workspace draft, so there must be a draft — the click trigger from the click guide is the worked example's test case.
- The container snippet installed on the site. Preview needs the container code on the page to load the draft. Without the snippet, Tag Assistant has nothing to connect to.
- The same browser for starting and testing. The debug view only appears in the browser where Preview was started. A second browser sees the live site, not the draft.
The trace
- In the Workspace tab, click Preview at the top right. Preview launches Tag Assistant in a new tab. This step needs a Google sign-in, so it was traced to Google's documentation, not run here.
- Enter the site URL and click Connect. Tag Assistant opens the site in a new tab with a Connected marker, and the debug view appears in the Tag Assistant tab. If the site breaks with the debug parameter in its URL, uncheck Include debug signal in the URL before connecting.
- Read the events and the two tag lists. The debug view lists the events for the page — Consent Initialization, Initialization, Page View, DOM Ready, Window Loaded — and for each event, Tags Fired and Tags Not Fired. Click an event to see which tags fired on it and in which order. In the worked example, 3 tags fired and 1 did not: 3 + 1 = 4 tags in the workspace, and the 1 that did not fire was the newsletter tag on a page with no newsletter form.
- Share the preview or exit it. To show a colleague the same draft, click More Actions in Tag Assistant, then Share, and send the generated link — the debug view is not visible to regular visitors, so the link is the only way in. To stop, click the exit control in the debug view; leaving a preview running does not change the live site, because Preview is a draft view, not a publish.
Dead ends
DEAD END — PREVIEWING AND THINKING IT IS PUBLISHED. Preview runs the draft in one browser only. Nobody else sees it, and the live site does not change until a version is published. A tag that fires in Preview and nowhere else was tested, not shipped.
DEAD END — EXITING PREVIEW BY CLOSING THE SITE TAB. Closing the site tab does not end the preview — the debug session stays active in the Tag Assistant tab. Exit from the debug view, or the next visit to the site in that browser still loads the draft.
DEAD END — TESTING ONLY THE HAPPY PATH. A preview that only loads the homepage proves the tag fires on the homepage. The exceptions, the second form, the page the trigger should skip — those are the cases that break in production, and Preview is the place to find them.
End state
A workspace tested in Preview, with Tags Fired and Tags Not Fired read for the worked example's 4 tags. The draft is proven or the failure is found — either way, the live site is untouched, and publishing is the publish guide.
Sources
- Tag Manager Help — Preview and debug containers — preview and debug mode runs the draft as if deployed, Workspace tab then Preview, Connect with the site URL, the debug signal option, sharing a preview, the debug view only in the starting browser
- Tag Manager Help — Set up Google Analytics in Tag Manager — Preview verification with Tag Assistant before publishing
Checked 11 November 2026. The click paths above are the ones in Google's help pages, opened 11 November 2026. No step in this guide was run inside a live Analytics property or a live Tag Manager container, because both need a Google sign-in and this site does not sign in as anyone. The container file was validated structurally instead: export format version 2, every tag's firing trigger resolves, every variable the tags reference exists in the file, and the tag types are the documented ones. Google moves menu items without warning; if a path on this page no longer matches, the linked help page is the current map. The container fragment for this guide is 2741 bytes (2.68 KB, 1.34% of the reported 200 KB container size limit), MD5 43d3d630789c6673d77f564f782b1334, and passed 28 structural checks.