Is there a way to send events to GA4 ONLY from the server web container? e.g. nothing is sent to GA4 directly from the client. I am able to do that for Meta/Facebook/Instagram and MixPanel but I can’t get it to work for GA4. I believe I am missing the client_id. I am using the stape data tag on the client side and the stape GA4 and Meta and MixPanel tags on the server side. I have the Stape Data Client installed. Everything is firing when it is supposed to fire. I have no filters to block anything inside GA4 and the measurement ID is put in appropriately. I think the issue is that I set no GA4 cookies on the client side and I don’t have a client_id. Is there a solution to avoid GA4 cookies on the client? Do I need to use the Google Tag on the client side? Do I need to install the GA4 client on the server side? Is this simply not achievable for GA4? Please help because I"m stuck.
Thanks!
I got it to work I think. It may have been GA4 was taking a while to process it? I did turn on and off google tag manager. I turned it back off and I hope I didn’t need it on. I also deleted the GA4 client on my server container. Not sure exactly what it was that i did but it is working… for now.
GA4 is not designed to operate fully on s2s tracking. This is due to the fact that most metrics in GA4 are collected automatically based on gtag.js which is loaded on the client.
You can send s2s events for example via measurement protocol: Measurement Protocol | Google Analytics | Google for Developers.
But this is intended for sending some events that cannot be tracked on the client, not all events. And yes, client id is a mandatory parameter.
It is technically possible to achieve full GA4 operation without the client part, but in fact it is extremely difficult and requires deep understanding of GA4 operation. It also makes little sense, because if you need s2s analytics, it is better to use analogues that support it, for example Matomo or Piwik.