Stape/Documentation

sGTM Preview header config power-up

Updated Apr 14, 2026

The sGTM Preview header config power-up lets you see all incoming server-side requests in the sGTM debugger, not just those from a web GTM container. This is essential when your data sources include APIs, backend systems, mobile apps, or webhooks.

sGTM Preview header config is available on the Free subscription plan and higher. To check your current plan or upgrade, go to your sGTM container settings.

How to set up sGTM Preview header config

1. Log in to your Stape account and select your sGTM container from the dashboard.

select your sGTM container

2. Go to Power-ups and click Use next to the sGTM Preview header config panel.

sGTM Preview header config

3. Toggle the sGTM Preview header config switch to enable it.

Toggle the sGTM Preview header config switch

4. Go to Google Tag Manager and open Preview in your sGTM container.

5. Click the three dots in the top right corner and select Send requests manually.

Send requests manually

6. Copy the X-Gtm-Server-Preview HTTP header value.

Copy the X-Gtm-Server-Preview HTTP header value

7. Enter this value in the Preview token field.

8. Click Save changes.

Save changes
!

Warning:

The HTTP header is a dynamic value - it changes over time. Always make sure you're using an up-to-date header before testing. The power-up is automatically disabled after 1 hour to avoid performance impact at high production traffic (10+ requests per second). Disable it manually once you're done testing.

Testing

To confirm the power-up is working, open your sGTM container's preview mode and send a request from a different browser or an incognito tab. If the power-up is active, those requests will appear in the debugger, which they normally wouldn't without it enabled.

Use case

A sample scenario is an e-commerce company that uses a third-party order management system to events that happen after a purchase (such as order_confirmed andĀ shipment_dispatched) directly to their sGTM server via webhook. The marketing team reports that purchase data in GA4 looks incomplete, some orders appear to be missing.

You can solve this problem by using the sGTM Preview header config power-up:

  1. In GA4, compare your reported purchase event count against the actual order volume in your order management system for the same period. If GA4 is consistently undercounting, the issue is likely in the server-side data pipeline.
  2. Enable the sGTM Preview header config power-up, copy the X-Gtm-Server-Preview header from your sGTM preview mode, and paste it into the power-up configuration. Then trigger a test webhook from your order management system and open the sGTM debugger.
  3. If the incoming webhook request appears in the debugger, inspect the event payload to check whether all expected parameters are present and correctly structured. Missing or malformed fields at this stage confirm that the problem is in how the webhook is built, not in your sGTM tags or GA4 configuration.
  4. Once you've identified and corrected the payload structure, re-trigger the test event and confirm everything maps correctly in the debugger before pushing the fix to production.

Comments

Can’t find what you are looking for?