/Collect requests not being sent from web container

Hi,

We are trying to set up server-side tracking and have managed to set up a server on stape, a sGTM container and have a web container installed on our website. The web container is installed using the GTM code snippet:

We are firing one GA4 tag from the web container which is routed to the stape server with the server_container_url parameter. This tag fires with no problems.

On the server container we have the GA4 client and the stape data client set up. The problem we currently have is that no /collect requests are being sent for the GA4 events and everything is being sent as a /data request and claimed by the stape client.

We injected the gtag code snippet using GTM in the web container and this actually solves the problem but my understanding is that it should work and fire /collect requests even without the gtag installed.

Does anyone have any ideas on what could be going wrong?

Many thanks!

/data requests are those generated by Data tag. GA4 requests do not change and always come to the /collect path in sGTM.

In your case, the problem may be that your Google tag setting is overwritten by another Google tag setting (by inline ga4 code or from some GA4 plugin/integration for example), which causes GA4 requests to be sent directly to GA instead of through your server container (server_conainer_url parameter is overwritten). The easiest way to check this is to use the browser’s network developer tab to see where your GA4 requests go.

1 Like