How to differentiate browser events from server events in GA4

Is there any possibility to differentiate between browser and server events as it is possible to do in the Facebook event manager?

There is no such functionality in the GA4. But you can, for example, add a parameter to GA4 in the server container and use it to determine the events that have been sent through sGTM in GA4.

It’s a good idea, I’m going to try it.

I’ll feed you back with the results.

I wonder how this work (in case we use the GA4 tag for SS tracking)? Does the web container even ping GA servers if we set the Server Container URL to point to the server container?

@Zakhariy_Derekh

a. you can use different Configs for different tags
b. you can also play with adding transport_url parameter to event tags themselves (while not having it in Config)
c. you could also have inline gtag…

you get the idea, there’s a lot of mix and match you can do, does it make much practical sense though? well that depends on what we’re trying to achieve here.


I have tried adding a parameter in the GA4 tag of the server container.

These are the results.

I have drawn the following conclusions:

The session_start and first_visit events are not picked up by the server side.

While the others are. Of course, I can’t see what facebook shows us, how many events come from the browser and how many from the server. The problem is that the server events are inherited from the browser so I can’t add a parameter to the web container tags to differentiate them. Or can I?

Best regards.

@Antonio_Ayala

  1. you can NOT add custom parameters to session_start and first_visit events, that will never happen. So your conclusion is wrong, server will pick up any GA4 event it receives.

  2. It is wrong to compare your FB reporting to GA4. For FB you are sending two separate hits, one from the server another one from the web. For GA4 you either have it just client-side OR you proxy those same client-side hits through your sGTM.

  3. As Alex already told you above if (and I’m still in the dark as to why would you want that) you can add a parameter on the server container (which it seems like you did) as such only events that were in fact proxied through sGTM will contain that parameter, whereas those hits that went directly from web to GA will not.

Thank you for your response.

I want to differentiate between server and browser events only and exclusively to see the quantitative difference between one and the other, as we can see on facebook. That’s all.

In any case, it is somewhat clear to me how we can differentiate them.

In general terms and leaving a little of this topic, do you recommend that in the configuration of the events in the sGTM are override and not inherit ?

For GA4 - inherit is more then enough, unless you have specific objectives in mind

Great, thank you.
All clear.