Server-Side Tracking Works in Preview but Not in Production: How to Diagnose It
When server-side tracking works in preview but not in production, the difference between your testing conditions and live traffic is hiding the problem. Preview uses a specific environment and routing that production does not share. Compare the two environments to find what changes between them.
Table of Contents
- 01.Preview is not production
- 02.What to check first
- 03.Container publishing
- 04.Server endpoint and DNS
- 05.Environment variables and tag configuration
- 06.Request routing and real traffic
- 07.How to test it
Preview is not production
Preview mode proves your container configuration works under controlled conditions. It does not prove the production setup works for real traffic. Preview uses a specific endpoint, a specific routing path and your own browser session. Production uses the live domain, real visitor paths and the published container version. A setup that works in preview but fails in production usually has a difference in one of these areas.
| Area | Preview | Production |
|---|---|---|
| Container version | Latest draft | Last published version |
| Endpoint | Preview endpoint | Live server domain |
| Routing | Preview routing | Real DNS and domain |
| Traffic | Your test session | Real visitors |
| Consent | Your consent state | Varied visitor consent |
| Environment variables | May differ | Production values |
What to check first
- Confirm the latest container version is actually published.
- Confirm the production server endpoint domain resolves.
- Confirm the web tracking sends to the production endpoint, not a preview URL.
- Check environment variables and secrets in the production container.
- Test with a real production path rather than a preview link.
Container publishing
The most common cause is simple: the changes work in preview because preview uses the draft, but production runs the last published version. If you tested in preview and never published, production still runs the old configuration. Confirm the container version you tested is published and live before you look anywhere else.
Server endpoint and DNS
Preview uses a preview endpoint that may differ from your production server domain. If you use a custom domain for the server container, confirm the DNS is correct and the domain resolves in production. A request that works against the preview endpoint but fails against the live domain is a routing or DNS problem. Check the network response code against the production endpoint.
Environment variables and tag configuration
Server containers often use environment variables or secrets for things like access tokens. These can differ between preview and production environments. A tag that works in preview because the preview environment has the token may fail in production if the production environment is missing it. Confirm the production environment has the variables and secrets the tags reference.
Request routing and real traffic
Real visitors take paths you may not test. They may land on pages you did not check, use devices with stricter browsers or arrive without accepting consent. Confirm the web tracking sends to the production endpoint on real pages, not just the page you tested in preview. A tag that fires on your test page but not on a real landing page is a page coverage problem.
How to test it
- 1.Confirm the container version is published.
- 2.Open a real production page and trigger the event without preview.
- 3.Check browser devtools for the request to the production server endpoint.
- 4.Check the production server container logs or incoming requests.
- 5.Confirm the destination platform receives the event from real traffic.
Frequently Asked Questions
Why does my server container work in preview but not for real visitors?
The most common cause is an unpublished container version. Preview uses the draft and production uses the last published version. Confirm you published the version you tested.
Could environment variables differ between preview and production?
Yes. Server containers can have separate environments with different variables and secrets. A tag that works in preview may fail in production if the production environment is missing a required token.
Need help applying this to your business?

PPC, Conversion Tracking, CRM and Automation Specialist. Helping businesses generate qualified leads with Google Ads, accurate tracking and automated follow-up.
Related Guides
Server-Side Tracking Not Receiving Events: How to Find Where the Data Flow Breaks
Server-side tracking has a longer flow than a browser tag. Trace the event from the user action through the web tracking, server endpoint and container to the destination to find the exact step that breaks.
Server-Side Tracking Stops Working After Consent Changes: What to Check
Server-side tracking does not bypass consent. The web layer still has to send the request, and that depends on consent. Align the consent configuration with the server flow rather than working around consent.
Server-Side Tracking Audit Checklist: How to Test Browser, Server and Destination Events
A server-side audit tests the full path from the browser event to the destination platform. Test each link in order and fix the earliest failing step first, because later steps depend on it.