Previewing and Debugging

Using the new version of Google Tag Manager? Read the updated version of this article.

Using Google Tag Manager's previewing and debugging tools, you can make sure your site's tags look and function as expected, and you can examine which tags are firing as you browse and interact with the site.

Note: Debugging is not currently available for mobile app containers.

Bitesize Training Video  

Watch this clip to learn about:

  • How to enter Preview & Debug mode
  • How to check whether your tags fired successfully
  • How to make your changes live by creating a new version of your container
  • How to create a new version of your container
  • How to make your changes live using publishing

Previewing (Web)

You can preview any version of a container. A version is essentially a saved snapshot of the container; read Publishing and Versions to learn more.

Quick Preview

Previewing the container allows you to see your site using an unpublished version of your container. Using Quick Preview, you can preview the container draft, with no need to create a version first.

Click Preview → Quick Preview to enable Quick Preview mode.

Debug Console (Web)

When debugging is enabled, a console window at the bottom of your browser shows detailed information about your tags, including their firing status and what data is being processed. This console window will appear only on your computer as you preview the site, and is not visible to your other website visitors.

Click Preview → Debug to enable Debug Mode.

In the left column of the Debug Panel you will see a list of all messages that have been pushed to the Data Layer, in the order that they were pushed. Selecting a message allows you to see a snapshot of the container state for a particular event on the page.

At the top of the message list is the Summary option, which will display aggregate information about the container. When viewing the Summary under the Tags tab a list showing all the tags fired on the page so far will be displayed, as well as a list of tags that are present but that have not fired yet. Clicking on a tag in this view will show information about the tag’s properties, firing rules, and blocking rules. When viewing the Summary under the Data Layer tab the five most recent messages pushed to the Data Layer will be displayed as well as the current state of the Data Layer within GTM.

You can select any event from the left column and inspect the state of tags, macros, and the Data Layer using the corresponding buttons at the top of the panel.

When an event is selected in the left column, the Tags tab will show the tags present for that event. The tags are separated between those that fired on the selected event and those that did not. Clicking on a tag in this view will show it’s properties and their values, as well as detailed information about it’s firing and blocking rules. In this view any macros used in the tag are displayed as chips, and a selector at the top of the page allows you to switch between displaying macros as names and resolved values.

The Macros tab will display detailed information about macros in the selected event, including the type of macro, the type of data returned, and the resolved value.

The Data Layer tab will show the exact message object 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.

Preview Sharing

Using the Share feature, you can generate a secret link that you can send to non-GTM users. Clicking on that link will allow those users to preview and debug this version of your container without logging into GTM.

Click Preview → Share from a saved version of your container to grab the Sharing link. The Turn on debugging when previewing checkbox should be enabled by default; deselect this if you do not wish others to see the debug panel. Copy the preview link and send to whomever you want to preview this container version.

How helpful is this article:

Feedback recorded. Thanks!
  • Not at all helpful
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful