Preview mode | Tag Assistant |
---|---|
Embedded on the page in an <iframe> . | Contained in its own window/tab. |
Practically impossible to debug mobile browsers. | Mobile debugging is trivial thanks to the detached preview interface. |
State is managed with a third-party cookie. | State is managed with first-party storage (cookie and localStorage ). |
Shows dataLayer interactions for the current page only. | Shows all API interactions (gtag.js , dataLayer ) for all the pages navigated to within the previewed site. |
Designed specifically to be used with web containers. | Now under the Tag Assistant suite - unifies design with server-side tagging. |
Requires authentication (e.g. through a shared preview link). | Debugging Google Tag Manager does require authentication, but gtag.js API calls and hits can be debugged without. |
dataLayer
history much easier than before.gtag
(e.g. via Google Analytics 4) and dataLayer
APIs, you can select the different containers from the drop-down menu in the header.gtag()
or dataLayer.push()
) in the left-hand side navigation.Include debug signal in the URL
option checked. This makes establishing the channel far more reliable on most modern browsers.No debugger found
). You can initialize a new Tag Assistant preview process by clicking the Open debugger button in the badge.__TAG_ASSISTANT
cookie and sever the connection until a new one is established via Tag Assistant.window.postMessage
channel is severed, and debugging will no longer work even if the user returns to the site being debugged.gtag()
API calls and all the hits dispatched by gtag.js
. Because of this, you can use the Tag Assistant debugger for gtag.js
hits without having to authenticate or anything.gtag.js
is to load a page on the site with gtm_debug=x
in the URL. This pops up the preview badge, where you can then click Open debugger to start a new preview instance.gtag()
API calls and hits that happen in the debug window.gtag()
appear in the list of messages, and you can see what was actually called by expanding the API call itself.gtag.js
implementation is very useful, indeed.gtm_debug=x
parameter is in the page URL (controlled by the Include debug signal in the URL checkbox).https://tagassistant.google.com
.__TAG_ASSISTANT
) is set on the domain being previewed.__TAG_ASSISTANT
first-party cookie to be written on the site. All three will result in the preview badge appearing in the corner of the page.tagassistant.google.com
to your Google Analytics referral exclusion list to avoid preview mode starting a new session.__TAG_ASSISTANT
tells the Google Tag Manager and gtag.js libraries to actively look for an open channel to Tag Assistant.window.postMessage
.window.localStorage
.window.postMessage
channel is created when the person doing the previewing clicks to connect a window to Tag Assistant:__TAG_ASSISTANT
cookie but has not been opened via Tag Assistant, you’ll see the page search for an open preview mode channel, only to report that no such channel was found.dataLayer.push
(or gtag()
call) all the way to the data being processed in Universal Analytics or Google Analytics 4.