G Suite is now Google Workspace: everything your business needs to get work done.

Preview and debug containers

Make sure your tag configurations function as expected.

Google Tag Manager’s preview and debug mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed, so that you can test a container configuration before it is published. Your previewed site is connected to Tag Assistant so that you can inspect which tags fired and in which order.

Enable preview and debug mode

To enable preview and debug mode for the current workspace:

  1. Click Preview in the top right of your workspace.
  2. Enter your site's URL.
  3. Some sites or pages might be broken by an additional debug parameter added to the URL. If so, you can uncheck the box Include debug signal in the URL.
  4. Click Connect. Your site opens in a new window and displays as Connected in the bottom right.
    If you have installed the Tag Assistant Companion chrome extension your website will open in a new tab rather than a new window.
  5. Click back on the Tag Assistant tab and click Continue to access the debug interface.

    You can also preview your site for debugging from the Tag Assistant activation page.

 

To preview an older version of a container:

  1. In the top navigation of your workspace, click Versions.
  2. Find the version you would like to work with, click More Actions More and select Preview.

Use preview and debug mode

Once preview and debug mode is enabled, a new window will launch for the page you entered. The debug interface shows detailed information about your tags, including how tags fired and what data is being processed. The debug interface will only appear on the same browser that was used to enable preview mode, or for shared users, and is not visible to your regular website visitors.

Use the information in the debug interface to find out if tags and triggers fire properly and what data they pass to their respective services. As you click through your previewed website, the debug interface will update information about how your tags are fired. You can use this information to see if a tag fired successfully, and what triggered (or did not trigger) its firing status.

The top navigation bar lists options to access information about Tags, Variables, and the Data Layer, and the left navigation Summary bar shows a list of events.

  • Tags: Click Tags to see which tags fired and which tags did not fire. Click a tag to view the tag's properties and associated triggers. When an event is selected in the left column, the Tags tab will show the status of tags for that event.
  • Variables: The Variables tab will display detailed information about variables in the selected event, including the type of variable, the type of data returned, and the resolved value. Select an event in the left navigation to view the status of variables at the time the event fired.

  • Data Layer: The Data Layer tab will show the exact message as it was pushed to the data layer for the selected event, and what the data layer looks like after the message transaction is complete. Select an event in the left navigation to view the status of the data layer at the time the event fired.
The debug interface is not available for the following container types:
  • Mobile app containers (to learn more about how to preview and debug mobile app containers, read the iOS and Android developer documentation.)
  • AMP containers (it is still possible to preview your site)

Share preview and debug mode

When preview and debug mode is enabled, the previewed container configuration and Tag Assistant debug interface are only visible from the same browser from where you activated preview and debug mode. You can share this preview with others with a custom-generated URL.

To share a preview of your workspace configuration with a colleague:

  1. Click More Actions More at the top of the Tag Assistant debug interface and select Share.
  2. In the Share debug session dialog, enter your target website domain and the tags to debug.
  3. Copy the resulting preview URL from the indicated box.
  4. Paste the copied preview URL into an electronic message and send it to a colleague. The preview URL lets the user connect to your site in preview mode and to view the Tag Assistant debug interface.

You can also share the current or older versions of a container from your workspace:

  1. In the top navigation of your workspace, click Versions.
  2. Find the version you would like to share, click More Actions More and select Share Preview.
  3. In the Share Preview dialog, enter your target website domain (e.g. https://example.com/.)
  4. Copy the resulting preview URL from the indicated box.
  5. Paste the copied preview URL into an electronic message and send it to a colleague. The preview URL lets the user connect to your site in preview mode and to view the Tag Assistant debug interface.

Exit preview and debug mode

To exit preview mode and stop debugging you can either:

  • Click Disconnect in the floating window on your previewed site.
  • Click the X in the upper left corner of the Tag Assistant debug interface.
  • Click Stop debugging on the Tag Assistant activation page.
Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
102259
false