sGTM preview not getting any hits while using gtag instead of wGTM

Hey, we have a client that doesn’t want to use wGTM (don’t ask me why :frowning:) So they’re sticking with classical gtag.

I’ve set up basic GA4 tracking in sGTM. AFAIK the first and most important thing they have to do is adding the parameter ‘server_container_url’ into the gtag config code, so the data is being sent to the Stape server instead of GA. And that’s all.

Issue I have:
Whenever I try to preview the sGTM, nothing happens. I see in the Console that on the website the GA events are being triggered/sent, I see in the Network tab that they are being sent either to Stape domain either to custom domain (whichever I’m testing), I can see with the Analytics debugger that everything works/is being sent, events are even marked as SGTM, so everything is fine. I can even see the events in the GA if I use additional parameter ‘debug_mode’: true. So the events are being tracked and sent to GA and GA is porcessing them.

What I don’t see though is the list of events/request to the sGTM container in the preview, something like this:

The preview list is completely empty.

I tried with plenty of options (basic implementation as described above, Stape endpoint/custom domain endpoint, serving Google scripts from Google servers/Stape servers, …). I just can’t see anything in the preview.

sGTM preview is of course important to test different things, especially because it’s the only way to see what’s really going on in the sGTM.

I don’t know if I’m doing something wrong or is this the expected behaviour (hopefully not! I mean, why do we have the preview for?). I’m just tarting to go mad :wink:

Hi,

Do you see the gtm_auth, gtm_debug and gtm_preview cookies attached to the Cookie header of the request that leaves your browser?
Or, alternatively (only if using some sort of custom implementation), the X-Gtm-Server-Preview header?

Like this

1 Like

Hey thanks for the reply and info about what to check. I managed to test/change some things and some thing are starting to show up.

One of the issues was also that I was previewing the wrong container for some time :wink: Silly me :face_with_peeking_eye:

1 Like

Great! That sometime happens to everyone :smile:.

Yes, there were some other issues, but not seing any requests in the preview was driving me mad :rofl:

Thanks for your time though