I have several doubts regarding the implementation of GA4 on the server side.
From what I understand, it is incorrect to send events from both the browser and the server to the same data stream, as GA4 does not handle de-duplication like META does.
To properly set up GA4, should I use two different streams within the same property, or should I use two separate properties?
You do not need to do this. GA4 in server side format works as a proxy. The data is not changed in any way, nothing happens to it (unless you have specially configured it, which is usually very rarely done), web requests are simply redirected further to GA4 from the server.
If you just add a new property and tags for it in parallel with the web - you will get bad results because GA4 is not designed to run multiple properties in parallel, especially if one of them is server-side and the other is client-side.
Thank you for the response. Please help me clarify some aspects.
My GA4 Web Tag includes a parameter called āserver_container_urlā with my Stape server.
In this case, does the web tag still send data to the Analytics servers and also pass the information to Stapeās client server, or does it only send the data?
I canāt understand whether Iām sending the data once or twice.
Looking at the web network events, it seems that the data is being sent twice, but Iām very confused about it.
If you have everything configured correctly, it does not send data to analytics directly, but sends data to the server, after which this data goes further to GA4 analytics from the server.
With the correct configuration, you send the data once from the server.
If you see that events go directly to the analytics and to the server in the network, you have incorrect settings. Most likely, you have an additional gtag snippet that can overwrite the main one. This is the reason why parallel (web and server) GA4 tracking is a bad practice.
In practice, with a correct setup, the GA4 Web tag should pass the data to the Client server, which sends the information to the servers. Consequently, the data is sent only once, exclusively server-side.
I will review my setup. Currently, I have only one GA4 tag.
I take the opportunity to ask you: Stape recommends using āserver_container_url,ā while others use āurl_transportā for server-side configuration.