头图

Websites with Tag Assistant debug mode enabled will be displayed in a separate browser window, allowing developers to check which Google tags fired and in what order. The Tag Assistant debug mode shows what data is being passed to the data layer and what events are triggering these data exchanges.

How to create a new debug session:

  1. Open the Tag Assistant Activation Page:

https://tagassistant.google.com/

Click Add domain to create a new debugging session. I have created a session as shown below:

Some sites or pages may not work properly due to additional debug parameters being added to the URL.
For example, the base site detection logic of Spartacus relies on the fragment after localhost:4200 to match the appropriate base site information through regular expressions.

If so, we can uncheck the "Include debug signals in URL" box.

To resume an active or closed debugging session, click the domain name in Active Domains or History on the Tag Assistant home page.

When enabled, a new window will be launched for the page you enter and the debug UI will open in the existing Tag Assistant browser window.

As shown in the figure below, the newly opened localhost:4200

The debug UI in the Tag Assistant window displays detailed information about your gtag() commands and hits, including how the code fired and what data was being processed.

Here are some examples:

Your regular website visitors don't see debug information. When you are navigating in the same domain and there is a global site tag on the page, the debug window will remain open and display debug information.

When you hit your website, the debug window will update with information about how your code is fired. You can use this information to see if the tag fired successfully, why it fired (or didn't) fire, and what network requests were made after the tag fired.

The default summary view displays an overview of event and tag information for the requested page. A list of events is displayed on the left side of the screen. The Output section will display a card for each hit detected for the selected ID.

Events are grouped by the page on which they occurred. Click the page title in the left navigation bar to view the page-level summary. When the user navigates to another page in the site that has the global site tag on that page, the new page group is added to the top of the list.

Events appear in the order in which they were fired and are numbered accordingly. The event marked with the <> icon is a built-in trigger that fires automatically when the global site code is loaded. Click on an event in the left column to view more details.

The API call shows the JavaScript used to configure the data for the selected event, either a gtag() call or a datalayer.push() call.

For example, after I click the Login button in debug mode:

I can see this login page navigation event displayed on the GTM dashboard:

Related variables:


注销
1k 声望1.6k 粉丝

invalid