This article describes Tag Assistant debug mode for global site tag installations.
Sites with Tag Assistant debug mode enabled will display in a separate browser window so that you can inspect which Google tags have fired and in which order. Tag Assistant debug mode shows what data is being passed to the data layer, and what events triggered those data exchanges.
Start a new debug session
To start a new debug session:
- From your web browser, open the Tag Assistant activation page.
- Click "Add domain".
- Enter the URL of the page you would like to debug.
- Click "Start".
- 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".
To resume an active or closed debug session, click the domain name from the "Active Domains" or "History" in the Tag Assistant home page.
Once enabled, a new window will launch for the page you entered, with the debug UI opening in the existing Tag Assistant browser window. The debug UI in the Tag Assistant window shows detailed information about your gtag() commands and hits, including how tags fired and what data is being processed. Debug information is not visible to your regular website visitors. The debug window will stay open and display debug information while you navigate within the same domain and as long as there is a global site tag on the page.
As you click through your website, the debug window will update information about how your tags are fired. You can use this information to see if a tag fired successfully, what triggered (or did not trigger) its firing status, and what network requests were made as a result of the tag firing.
Troubleshoot connection issues
If the debug window does not connect to your page successfully, try some of these solutions:
- The URL you entered might not have a global site tag on the page. Try a different URL on your website where you expect to have a global site tag installed.
- The debug parameter added to the page URL may have broken page behavior. To solve this, edit the domain that you enter for debug mode, and deselect the checkbox labeled "include debug signal in the URL".
- The global site tag script is loaded after the point when Tag Assistant tries to connect to the page. Click "Retry" to connect again.
- Your page is an AMP page. AMP is not currently supported by Tag Assistant.
- The page loads the global site tag in an iframe. iframe-loaded tag configurations can only be debugged when the Tag Assistant chrome extension is also installed.
- Multiple browser redirects can prevent the debug window from loading.
- Ad blockers installed in your web browser may prevent the global site tag from running. Disable ad blockers for the pages you need to test.
Debug mode information
The default Summary view shows an overview of events and tag information for the requested page. The left side of the screen displays a list of events. The Output section will display a card for each hit detected for the selected ID.
Events are grouped by the page where they took place. Click on a page title in the left navigation bar to view a page-level summary. A new page group is added to the top of the list as the user navigates to another page in the site that has a global site tag on the page.
Events appear in the order they were fired and are numbered accordingly. Events marked with a are built-in triggers that emitted automatically when the global site tag loaded. Click on an event in the left column to view more detail.
Output will show where hits were sent, updates to the data layer, and any errors.
Hits Sent will show where a particular hit was sent, and what kind of hit it was:
When you click on this hit, a detail panel will appear. This view shows detail about the parameters that were sent with each hit.
The Data Layer tab shows values found in the
dataLayer object. When Summary is selected, it will display the current state of the data layer, as well as the data that was pushed to the data layer for each event.
If multiple tag products or properties are detected, use the select menu to change to another product or measurement ID.
Note: Browser events may be applied to all containers, but the hits are filtered by the container that is selected.
To minimize the debug panel, click __ in the floating window on top the page. The window reappears when the page is refreshed or the user navigates to another page. To stop debugging the domain, click X in the floating window. The page will reload with no debug panel.
If the website window is closed, it can be relaunched by clicking Reopen in the debug window.
You can start a new session from the Tag Assistant home page. Click a domain listed in the Active Domains section (for active sessions) or the History section (for closed sessions).
Exit debug mode
To exit debug mode:
- Switch to the web browser tab that is active for debug mode.
- Click Stop Debugging in the floating window, home page, or the X in the upper left corner of the debug window.
Interoperability with the Tag Assistant Chrome extension
The Tag Assistant chrome extension operates as a companion to the extension-less debugger. When the Chrome extension is present, the following features are enabled:
- Detection of a global site tag inside an iframe.
- Debugging of pop-up windows or new tabs opened from the current window.
- The debug window opens in a new browser tab instead of a pop-up. This allows the user to manipulate the browser URL bar and can help facilitate debugging of referrer-based actions.
- Multiple windows can be debugged in the same debug session. Each window is marked with a symbol in the event tree so that they can be easily identified.
Tag Assistant will automatically set a "debug" parameter (
_dbg) for hits sent to an App + Web measurement ID. This can help you see the hits displayed in other debugging surfaces such as App + Web's DebugView. To give you the ability to inspect hits individually, App + Web hits are not batched when sent.