Previewing and Debugging

Using Google Tag Manager's previewing and debugging tools, you can make sure your site's tags function as expected.

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

Google Tag Manager’s Preview mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed. To enable Preview mode, click on the arrow next to the publish button and select Preview.

You can also preview any version of a container. A version is essentially a saved snapshot of the container. To preview a previous version of your container, navigate to the Versions tab and next to the desired version select Action → Preview.

Once the Preview mode is enabled, navigate to the site where the container is implemented and you will see a console window at the bottom of your browser showing 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.

In the left column of the Debug Panel you will see a list of all events that have been pushed to the data layer, in the order that they were pushed. Selecting an event allows you to see a snapshot of the container state for a particular event.

At the top of the event 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 triggers, and blocking triggers. When viewing the Summary under the Data Layer tab, the five most recent events pushed to the data layer along with additional variables set for each will be displayed as well as the current state of the data layer within Google Tag Manager.

You can select any event from the left column and inspect the state of tags, variables, 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 triggers. In this view any variables used in the tag are displayed as chips, and a selector at the top of the page allows you to switch between displaying variables as names and resolved values.

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.

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.

Was this article helpful?