I'm trying to migrate my Google Tag Manager to the Server-Side version. The workflow is actually working, the client container sends data to the server container and finally I see the tracking arriving in GA4. What is not working is the Preview server.
My Server-Side and its Preview are deployed as distinct deployments in a K8s on premises.
I have 1 ingress for each of those, and they expose respectively analytics.mydomain.com
and preview.mydomain.com
. Sending an HTTP request to /healhz
on both of these domains return OK.
Now, when I hit the preview button on the client container menu in my browser I can successfully load the Preview dashboard But if I reload the page I'm tracking, I don't see any new events collected. Moreover, if I use the "Send request manually" option using this curl
curl -H 'x-gtm-server-preview: ZW52LTN8X1VtScensoredDYxN2M4MDkyMzU3ODRhYzYxOWM==' 'https://preview.mydomain.com/g/collect?v=2&en=page_view&tid=G-1234&cid=123.456&dl=https%3A%2F%2Fexample.com%2F'
The response I got is Not Found
.
What could possibly be the issue here? I also tried to deploy it outside K8s in a simple docker container but I had the same problem, It won't load events and will always respond Not Found
.