Server GTM Preview - Intermittent Success

Hey everyone — hoping someone can help me get sGTM preview working reliably again.

I’ve been setting up web + server-side tracking over the past week, with a webhook stream for purchase and refund events. Earlier in the week I was able to preview server container events using the Header Config Preview PowerUp. It wasn’t flawless but it worked.

Since then it’s deteriorated. Now I can’t connect to server preview at all, and none of my usual fixes work anymore:

- Restarting a new preview session

- Clearing cookies and browsing data

- Refreshing the header token in the PowerUp

What makes this confusing is that the container itself is clearly fine. The Stape logs show incoming requests and outgoing tags firing correctly. No errors in the event pipeline. But the Preview panel stays completely empty no matter what I do.

Has anyone run into this? Specifically: what causes the preview connection to degrade over time, and is there a reliable way to get it back? Would appreciate any insight — I’ve burned hours on this.

The HTTP header is a dynamic value – it changes over time, so you must remember to disable the power-up manually after testing, as this can affect both your container’s performance and the preview. Always ensure you’re using an up-to-date header before testing.
Did the server preview not work at all, or only when the power-up was enabled?

I have now redeployed your container; please check that the preview is working and let me know if everything is ok.

Hi there Dmytro,

Thanks for redeploying the container but unfortunately it still looks like I’m not having any joy with it.

A couple of interest observations:

  • The server preview is failing consistently and not firing any events

  • the logs are recording events for both incoming and outgoing

  • the webhooks seem to be coming through okay so it looks like some connections are established but just not displaying the rest which is really interesting.

    Any other potential solutions you could suggest?

Please ensure that the server container URL in the web container matches the one you added in the server container settings.
This is very often overlooked after changing a custom domain to another one or after configuring a Same Origin custom domain.

Please also provide the container ID on Stape so that I can make sure I am looking at the same container as you.

I’m dealing with a similar case. I activated the sGTM Preview Header config within the Click Restorer setup to test my use case. Since deactivating it, I no longer see any events in the sGTM debugger. It seems to still be working overall because events are arriving in GA4, but I would like to be able to use the sGTM debugger again. Could this be related to the fact that the ID cannot be deleted from the header config, and it’s still actively being used even though the Power-Up is deactivated?

Thanks @Dmytro - looks like it is largely resolved over a couple of days.

Hey Garwin,

Just want to share my experience. I experienced similar issues and did the following to make sure it works for me:

  • enable both web gtm preview first and launch the preview page
  • enable the server gtm, paste the container code to stape’s Preview Header Config poower-up
  • wait for 1-2 minutes before I start observing any activities
  • always turn it off after use - I find the I use it, the less reliable it is
  • Also use Stape’s outgoing log to verify where possible.

Good luck and hope the issue is resolved for you.