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.

> [!NOTE]
> **Note:** You can click any box in a tab to open a slider panel with full details.

![Screenshot showing Tag Manager in preview mode](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-layout.png)

> [!NOTE]
> **Note:** Google Analytics bundles events within one request and you may see more than one event under a top-level incoming request (`collect?v=...`). These events represent all events sent in that request. However, when you run your client-side container in preview mode at the same time, the hits are not bundled.

## 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-request-tab.png)

### 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-client-details.png)

> [!NOTE]
> **Note:** The client that claimed the request is not necessarily the client that generated the event data.

### 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-incoming-request-details.png)

> [!NOTE]
> **Note:** AppEngine appends additional headers that do not show up in the browser. Other cloud services may also append their own data.

### 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-outgoing-request-details.png)

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

![Screenshot showing Tag Manager outgoing response details](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-outgoing-request-response.png)

## 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-tags-tab.png)

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

![Screenshot showing Tag Manager tag details](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-tags-detail.png)

Read [How to build a server tag](https://developers.google.com/tag-platform/tag-manager/server-side/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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-variables-tab.png)

The data used to set the variable values is shown in the [**Event Data** tab](https://developers.google.com/tag-platform/tag-manager/server-side/debug#debug_event_data).

Read [Variables](https://support.google.com/tagmanager/topic/7683268) for more information about configuring [built-in variables](https://support.google.com/tagmanager/topic/7182737) and
[user-defined variables](https://support.google.com/tagmanager/topic/9125128).

## 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](https://developers.google.com/tag-platform/tag-manager/server-side/debug#debug_variables).

![Screenshot showing Tag Manager Event Data tab](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-event-data-tab.png)

## 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](https://developers.google.com/static/tag-platform/tag-manager/server-side/img/debug/tag-manager-preview-console.png)