Debug and test your server-side setup
A server-side setup has more moving parts than a web container: the browser, your subdomain, the server container and the vendors behind it. When data goes missing, you find the break by following one hit along that path. This lesson shows the tools for each step and the problems that come up most often, with their fixes.
Intermediate 9 min read Version 1.4, updated October 3, 2026
On this page
What you will learn
- Run web and server Preview side by side and read what the server container did with each request.
- Confirm in DevTools and GA4 DebugView that hits reach your subdomain and GA4.
- Recognise and fix the most common causes of missing server-side data.
- Use the SGTM.space container tabs to check health, DNS, traffic and your live install.
01 Run web and server Preview side by side
GTM Preview works in both containers at once. The order matters: the server Preview session has to be open before the web Preview sends anything, and both must run in the same browser.
- 1 Open the server container in GTM and click Preview. A Tag Assistant tab opens on
k7q2x.example.com(it opens there when Server container URL is set in the server container's Admin, Container Settings, see lesson 2). Leave it open. - 2 In the same browser, open the web container and click Preview. Enter your website address and click Connect.
- 3 Click around the site and trigger the event you want to test.
- 4 Switch to the server Preview tab. Each incoming request appears in the left column.
Select a request and read it from top to bottom:
- Request: the incoming HTTP request, and the Client that claimed it. A GA4 hit should be claimed by the GA4 client.
- Tags: which tags fired and which did not. A tag that did not fire usually has a trigger that did not match.
- Outgoing HTTP requests (on the Request tab): what the server sent to GA4 or another vendor, and the status code it got back. A 2xx status means the vendor accepted it.
- Event Data: the parameters the client extracted. Check that your event name and parameters arrived.
02 Check the browser and GA4
Preview tells you what GTM did. Two more checks confirm what actually left the browser and what arrived in GA4.
- 1 Open DevTools (F12), go to the Network tab and filter by
collect. - 2 Reload the page. You should see requests to your own subdomain, not to
google-analytics.com. - 3 Check the status:
200or204means your tagging server accepted the hit.
https://k7q2x.example.com/g/collect?v=2&tid=G-XXXXXXXXXX&en=page_view&...Then open GA4, go to Admin, then Data display and DebugView. Events from a browser in GTM Preview are marked as debug traffic automatically. Outside Preview, add the debug_mode parameter with the value true to your Google tag to see them there. Remove it afterwards: setting it to false does not turn debug mode off.
03 Common problems and how to fix them
Most broken setups fail in one of these places. Work through them in order, from the DNS to the vendor.
Check DNS fails or the subdomain does not resolve
The record may still be propagating (wait up to an hour), the name may contain the domain twice (k7q2x.example.com.example.com, because some panels add the domain for you), or Cloudflare proxying is on. On Cloudflare the record must be DNS only (gray cloud), not the orange cloud.
Wrong or old Container Config
If the server container in Preview does not match the one you edit in GTM, copy the Container Config again from Admin and Container Settings and make sure your SGTM.space container uses exactly that string. A config from another server container sends your traffic to the wrong one.
Server Preview does not open on your subdomain
Set https://k7q2x.example.com as the Server container URL under Admin, Container Settings in the server container and save.
Hits still go to google-analytics.com
The server_container_url parameter is missing from the Google tag, has a typo, or the web container was not published after you added it. See lesson 3.
It works in Preview but not for real visitors
The server container was never published. Preview uses your workspace, live traffic uses the published version. Click Submit and Publish in the server container.
Requests arrive but nothing reaches GA4
The server container has no GA4 tag, or its trigger does not match. Add a Google Analytics: GA4 tag triggered by Client Name equals GA4, as shown in lesson 4.
Hits are missing for some visitors
All requests are suddenly rejected (HTTP 429)
The container has used its plan's monthly requests and overage is off or used up. Requests are refused until you change the plan, turn on overage on the Plan tab, or the billing period resets. With Better Loader, GTM itself stops loading too.
04 Use the SGTM.space container tabs
Each container in SGTM.space has tabs that answer the questions GTM cannot.
- Overview: the container status and its Health checks (DNS, Loader DNS, Container, Loader script). Start here when nothing arrives at all.
- DNS: the records to add and their state. Use Check DNS after every change.
- Analytics: the number of requests per day from pages of your site, likely bots (counted even before Bot Filtering is on) and, in Block mode, blocked bots. A sudden drop to zero points to a broken install or a DNS change, not to GA4.
- Plan: your plan and how much of its monthly requests the container has used. You also turn on overage here.
- Add-ons: each add-on is a card with Enable, and once it is on, Settings on the card opens its settings page. One of them, Preview Mode, sends matching requests from webhooks, a CRM or your backend into your open server Preview session for 60 minutes.
Preview Mode helps when the requests do not come from your browser, so the normal Preview cookie is missing.
- 1 Open Preview in the server container. In the top-right menu choose Send requests manually and copy the
X-Gtm-Server-Previewheader value. - 2 In SGTM.space open Add-ons, click Settings on the Preview Mode card and paste the token.
- 3 Optionally set a path prefix (for example
/webhooks) and a source IP, so only those requests are forwarded. - 4 Click Save and start for 60 minutes and trigger the webhook or backend call. It appears in your Preview session.
05 A quick test checklist
-
https://k7q2x.example.com/healthyreturns 200 and the container is Ready in Overview. - DevTools shows
collectrequests to your subdomain with status 200 or 204. - Server Preview shows the request claimed by the GA4 client.
- The GA4 tag fired and its outgoing request got a 2xx status.
- The event appears in GA4 DebugView.
- Both containers are published.
Frequently asked questions
Why is the server Preview empty while the web Preview shows events?
Either the hits do not go to your subdomain (check server_container_url and the Network tab), or the server Preview was opened in a different browser or after the web Preview. Open the server Preview first, then start the web Preview in the same browser.
Can I debug requests from my backend or a webhook?
Yes. Copy the X-Gtm-Server-Preview token from Send requests manually in the server Preview and paste it into Preview Mode in SGTM.space (open Add-ons and click Settings on the Preview Mode card). Matching requests show up in your Preview session for 60 minutes.
GA4 shows fewer events than the Analytics tab. Is data lost?
Not necessarily. The Analytics tab counts requests from pages of your site (webhook and backend calls are not in it), including script loads, bots and events that no tag forwards. It also shows likely bots, even before Bot Filtering is on, and blocked bots in Block mode. Compare a single event in Preview and DebugView instead of totals.
Ready to put it into practice?
Deploy a server GTM container on your own domain in a few minutes. The Free plan needs no card.
Create a free account