taggrs-logo

Debugging in the Server Container – Test and validate Server Side Tracking configuration.

Debugging-in-the-Server-Container-Test-and-validate-Server-Side-Tracking-configuration-1

You have completed your setup of Server Side Tracking and now face the challenge of validating everything. This is important for the efficiency and accuracy of your tracking efforts. Fortunately, Google Tag Manager (GTM) offers a preview mode designed specifically for these purposes, although it works a little differently than you might be used to with just a webcontainer.

In this blog, we will guide you step by step through the process of debugging in Server Container. Debugging your Server Side setup can seem complex at first, especially because of the differences with the Webcontainer. However, with a clear explanation and practical steps, you can meet this challenge and ensure a robust tracking solution.

Our goal is to provide you with the knowledge and tools you need to confidently debug and validate your tracking configuration.

Key Points 🔑:

  1. Google Tag Manager (GTM) Preview Mode: Understand how to activate and use this mode for both Web and Server Containers to validate your Server Side Tracking (SST) configuration.
  2. Differences between Web and Server Containers: Recognize the unique elements of the server container and how they differ from the web container during debugging.
  3. Validation of Incoming and Outgoing Data: Verify that the GA4 client within the server container correctly receives and processes the data to external platforms.
  4. Tag Activation and Data Flow: Test that all required tags are activated and that the relevant data is sent along.

What is the situation?

We focus on debugging our TAGGRS Demoshop, a basic E-commerce webshop. For testing, we set up several components to create a tracking environment:

  • Google Tag (Web Container)
  • E-commerce events (Web Container) Events.
  • TAGGRS Tracking Tag (Web and Server Container).
  • Google Analytics Events (Server Container)
taggrs-demo-shop

Server Side Set Up Testing in Google Tag Manager.

1. Open preview mode in Google Tag Manager.

Getting started! The debugging process in the server container differs from that in the web container in that you must activate preview mode for both web and server containers.

  • Open server preview (normal if you don’t see anything coming in)
  • Open preview webcontainer and add website url.
  • In either preview mode, see if the data is coming in.

For a clear explanation of this process, please refer to the video below.

Can’t figure it out? Check out our support article on opening debug mode in the server container.

2. Preview mode view

When opening the preview mode in GTM, differences between the Web and server containers become clearly visible. The server container introduces new tabs specific to its functionality.

Preview-mode-situation-web-and-server-container-1

In the Web Container on the left, we see under summary:

  • Window Loaded: This moment indicates when the entire browser window, including all dependent resources such as images and stylesheets, is fully loaded.
  • DOM Ready: This point marks when the page’s Document Object Model (DOM) is fully built, allowing scripts that depend on the DOM to begin executing.
  • Container Loaded: Indicates when the Google Tag Manager container is fully loaded and initialized on the page, ready to start processing tags.
  • Initialization: This is when Google Tag Manager begins initialization of the setup, before tags are evaluated and executed.
  • Consent Initialization: This refers to when consent (consent) settings are initialized and processed within the container, essential for privacy compliance.
  • Message: This refers to a general notification or message that may appear during the debug process, often used to report specific actions or errors within tags implementations.
gtm-web-container-preview-mode-what-is-what.

In the Server Container, we see:

  • Summary: Here we see a summary of all incoming requests that the server container has intercepted.
  • Requests: Displays the HTTP requests coming in and going out from the server and which client processed them.
  • Tags: Shows which tags have been fired in the server container.
  • Variables: Contains information about all accessible variables sent through the request.
  • Event Data: Here you see the event data object constructed by the client.
  • Console: Displays helpful log messages.
gtm-server-preview-mode-what-is-what

Under Summary in the server container, specific events are represented by the parameter collect?=v, which indicates the type of event being processed, for example, a GA4 event. Under collect is the event, which in this case is page_view.

  • js?id=G-XXXXXXXX = Request from Google Tag JavaScript library.
  • collect?v=2 = GA4 requests

3. Does data enter the server container?

To check that data is coming in correctly to the server container, we first check that the server container has received data from the Webcontainer. We do this through the “request” section within GTM. Here you can see which client has processed the incoming requests, which requests are coming in and which are going out.

  • Outgoing HTTP Request from Server: The data sent from the server container to external platforms.
  • Incoming HTTP Request: The data sent from the Webcontainer to the server container.

In the server container, under the‘requests‘ heading, we can confirm whether the GA4 client has captured the data correctly.

tagmanager-server-container-request-incoming

In this case, we note that the GA4 Client successfully captured the data. The data is then forwarded to TAGGRS’ API and to Google Analytics (outgoing HTTP requests), while the incoming request is identified as /g/collect?v (which is GA4).

4. Are all required tags fired?

Now that the data is successfully passed from the Webcontainer to the Server Container and then to Google Analytics, it’s time to test whether our set tags are working correctly. We focus on testing a ‘view_item’ event in our TAGGRS Demo Webshop.

view_item-debug-mode-web-and-server-container

In the Webcontainer, we observe that two tags are activated: our GA4 Events tags and the TAGGRS server tag. This is the time to check that all necessary tags are activated as intended. When this happens, it confirms that the triggers are set correctly and the data is being adequately forwarded to the server.

5. What data does the tag send with it?

After the necessary tags are correctly activated, it is important to check what specific data these tags send with them. This can be viewed in the event data section within the Server Container. Here you will find all the data that has been forwarded from the Webcontainer to the server container. For a ‘view item’ event in our demo shop, for example, we want information such as the product’s price, name, and possibly an Event ID to be forwarded. This segment allows you to check that the variables created are passed correctly.

view_item-debug-mode-server-container-event-data

You don’t literally work in Server Container with data layer structure but with names of parameters that you pass.

5. Check if the data has come through correctly

After activating the appropriate tags, the next step is to verify that the data has been processed correctly in the relevant platform. You can assess this through the debug modes of the platforms themselves, or using various Debug Chrome extensions. Within your TAGGRS Server Side Analytics Dashboard, you can check the following:

  • Incoming Requests: Check for incoming requests in the dashboard.
  • Web Container and Server Container Line: Here you can observe if data is coming in from both web and server and what is the percentage difference between the two.
  • Data per Event: Analyze how much additional data is processed per event. For example, if you notice that an event is measuring 50% less, but is measuring more overall, it is advisable to check the configuration of that event for any errors.
taggrs-server-side-analytics-dashboard

Tip: Check out our TAGGRS Debug Series to see the most common situations and solutions in our software.

Other tabs in debug mode

Console / Errors (Web / Server Container): The webcontainer may show errors similar to what you would see in the console, while the server container has a special console tab added. This debug tab can provide useful additional information for debugging. This is a debug tab that can provide additional information that might be useful for debugging (not important).

tagmanager-server-container-console

Consent (Webcontainer): If you have configured permission (consent) settings, for example with Consent Mode V2, this tab shows which consent statuses have been set and fired, which is particularly useful for debugging consent mode v2 and also for checking default settings. Want to test your set up without the restrictions of Consent Mode? You can do that with our TAGGRS Consent Mode Blocker.

consent-tag-manager-preview-mode-web-container

Data Layer (Webcontainer): In preview mode of the Webcontainer, the Data Layer tab provides essential information about the structure and data sent by the website for tracking purposes. This is an important source of information for all tags that depend on the data layer to function.

gtm-preview-web-data-layer

Variable (Webcontainer): The Variables tab lists all available variables within the container that can be used to set triggers or define tag configurations. This tab is important for understanding what data is available for use in tags and triggers.

gtm-preview-web-variables

That was it – SST Set Up Testing

You are now equipped with the knowledge and tools to effectively test your Server Side Tracking (SST) setup. We learned how to open the preview mode in Google Tag Manager, what data is sent by your tags and how to verify that all required tags are activated at the right times. Don’t forget to monitor incoming and outgoing requests and verify the data in your Dashboard. Now that you are sure the data has been transmitted and processed correctly, you can confidently apply your SST for accurate and reliable data tracking. Test thoroughly, optimize where necessary and see your efforts rewarded with reliable, compliant data collection. Good luck with your SST setup testing! In doubt that you have everything set? Then check out our Server Side Tracking checklist.


About the author

Ate Keurentjes

Ate Keurentjes

Server Side Tracking Specialist at TAGGRS

Ate Keurentjes is a Server Side Tracking specialist at TAGGRS. He has experience with various Google Tag Manager concepts. Keurentjes has been editing and writing about the latest developments and trends in data collection / Server side tracking since 2023.

Ready for the next level?

Start with Server Side Tracking and generate more revenue and conversions in a world without third-party cookies.