Get started with Tag Manager

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. Go to https://tagmanager.google.com.
  2. Sign in to your Google Account. Learn how to create a new Google Account.
  3. Open the Tag Manager container you want to edit.
  4. In the Workspace tab, click Preview (top right) to launch Google Tag Assistant in a new tab.
  5. Enter your site's URL.
  6. 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.
  7. 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.
  8. 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 check if a tag fired successfully, and what triggered (or did not trigger) its firing status.

For Server containers, the debug interface has different tabs. Read Preview and debug server containers for more information about using preview mode for server-side tagging.

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:

Screenshot of the Share and Preview mode container.

  1. In Tag Assistant, click More Actions More , then 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:

  1. Click the X in the upper left corner of the Tag Assistant debug interface.
  2. Click Stop debugging on the Tag Assistant activation page.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
2316178664381945463
true
Search Help Center
true
true
true
true
true
102259
false
false