Thanks for previewing Google's new tag platform documentation! This site is in public beta. (Feedback)

Preview and debug server containers

You can preview and debug your server-side container in Tag Manager.

Understand the preview layout

To open the debugger, in Tag Manager select your server container and click Preview.

The left panel lists incoming HTTP requests, e.g. collect?v=2&..... If the client that claimed the request created an event data object, e.g. scroll, page_view, add_to_cart, this event displays as a sub item under the request.

The tabs on the right include details about the item selected in the left panel. Each tab is discussed in a separate section.

Screenshot showing Tag Manager in preview mode

Debug requests

The Request tab contains boxes for the:

  • Client that claimed the request
  • Outgoing HTTP requests
  • Incoming HTTP request

Screenshot showing Tag Manager Request tab

Check the right client claimed the request

Server containers can have many clients, but only one client can claim a request. The correct client recognizes the format of the request from the browser and claims it if there is a match.

Click the Client box to check the client’s details. This information should correspond with the client configuration in Clients > Client name.

Screenshot showing Tag Manager client details

Check incoming requests

Click the Incoming HTTP Request box to view the full details of the incoming request.

The request (collect?v=...) should be a 1:1 representation of what you see in the Chrome network tab. Confirm that what you see in the browser is a match and that the server container is receiving the right parameters.

Screenshot showing Tag Manager incoming request details

Check outgoing requests

Click any Outgoing HTTP Requests box to view details about the:

  • Tag that generated the request
  • Outgoing request
  • HTTP response returned by the vendor endpoint

The outgoing request details show the data sent by the server container to the vendor endpoint.

Screenshot showing Tag Manager outgoing request details

The Response shows the status code, headers and body (if any) returned by the vendor endpoint.

Screenshot showing Tag Manager outgoing response details

Debug tags

The Tags tab lists all configured tags:

  • Tags Fired: Tags fired by the event. Each box indicates whether the tag failed or fired successfully, and the number of times the tag fired.
  • Tags Not Fired: Available tags that did not fire.

Screenshot showing Tag Manager Tags tab

Click any box to view the tag properties, outgoing HTTP requests and firing triggers.

Screenshot showing Tag Manager tag details

Read How to build a server tag for more information about configuring and implementing server tags.

Debug variables

The Variables tag lists the event’s variables and includes the variable type, return type, and value. For example, the screenshot below for a user-engagement event shows the var_screen_resolution variable set to “1536x864”.

Screenshot showing Tag Manager Variables tab

The data used to set the variable values is shown in the Event Data tab.

Read Variables for more information about configuring built-in variables and user-defined variables.

Debug event data

The Event Data tab shows full details about the event. This data is used to set the variable values in the Variables tab.

Screenshot showing Tag Manager Event Data tab

Console

The Console tab shows all errors originating from fired tags. The log includes each error message and its source, e.g. an invalid endpoint or target API call.

Screenshot showing Tag Manager console