Stape
SearchTry for free
FreePower-ups

sGTM Preview Header config

You can send requests to the server GTM container from any data point outside of web GTM. Due to technical limitations, you can only see web GTM requests in the server GTM preview mode. But do not worry, we have a Preview Header power-up that fixes this problem.

Stape's Preview Header is available to all users. It will be beneficial if you send requests to sGTM from elsewhere outside the Web GTM and want to see them in the sGTM debugger.

To set up Stape's Preview Header, all you need to do is open the sGTM preview mode, click three dots in the top right corner, click send request manually, copy the Preview Header, and paste it into your Stape's container settings. 

Since the Preview Header is a dynamic value, removing the Preview Header from your stape.io account after you are done with testing is essential. Otherwise, you won't see any requests in the sGTM debugger the next time.

How to set up sGTM Preview Header

1. Open sGTM preview mode -> Click three dots in the top right corner -> Click Send requests manually -> Copy X-Gtm-Server-Preview HTTP Header. 

Send requests manually sGTM
Send requests manually sGTM

2. Go to your stape.io account  → Open sGTM container → Click Power-ups → Click sGTM Preview Header config → Paste GTM Server Preview HTTP Header that you've recently copied in sGTM preview.  → Click Save

sGTM Preview header config to see all incoming requests in the server debug mode.
sGTM Preview header config to see all incoming requests in the server debug mode.

3. HTTP Header in sGTM is a dynamic value; make sure to remove the Preview Header in sGTM power-up once you've done with testing.

Use cases of the power-up

Related to this solution

Debug incoming webhooks in Google Tag Manager server preview
Sep 20, 2021

Blog

Debug incoming webhooks in Google Tag Manager server preview

One of the ways to use server-side tracking is sending data directly from your server endpoint to the server GTM container. This guide will show how you can send requests to the GTM server container with webhooks and how to see and test webhook data in the server Google Tag Manager container. We’ll also go over some common scenarios where it makes sense technically and practically speaking.

Send data from CRM to Facebook Conversions API using webhooks
Sep 11, 2021

Blog

Send data from CRM to Facebook Conversions API using webhooks

Track offline conversions by sending CRM data to Facebook Conversions API via webhooks. Easily set up with GTM server containers for accurate attribution. The most popular way of integrating Facebook Conversions API is using the Google Tag Manager server container. But there are other ways to do that: using Zapier, direct integration, integration with the CRM using webhooks, and much more.

How to easily add user agent and geo data to server Google Tag Manager
May 16, 2023

Blog

How to easily add user agent and geo data to server Google Tag Manager

Discover how Stape’s User Agent Info and GEO Headers enhance server-side tracking by providing valuable device and geographic data for your sGTM container.

We have more than 100 000 happy clients

Try Stape for all things server-sideright now!