Was there a change to the Google Analytics destina...
# support
a
Was there a change to the Google Analytics destinations on Tuesday this week? Suddenly the _ga cookie seems to be reset from the Google Analytics numeric client id to the Rudderstack User/Anonymous ID. I can see this update happen a few seconds after the cookie is saved. It seems to happen regardless of whether 'Disable Md5 encryption from Client ID' is enabled or disabled. Could this be a bug or is it expected behaviour?
b
@alert-vegetable-59655 we changed client_id mapping across all modes, now client_id will be mapped with rudderstack anonymousId by default so that you can have batter consistency
a
OK thanks for the quick response @bulky-breakfast-19942. However I send through the GA clientId in "integrations" object within payload, as we want to use the GA clientId to track users in GA, not Rudderstack ID. Reason is we have an iFrame on the site that also tracks to GA but without Rudderstack (so uses GA clientId ) and we want to be able to join the sessions together in GA. How can I use the previous behaviour?
b
are you using ga4 device mode?
a
I am using both GA Universal and GA4 destinations. GA Universal is in Cloud mode and GA4 is in Hyrbid mode
b
i think it's not possible now as we have too many requests regarding consistent client_id
a
So just to be clear, is it Rudderstack that changes the id value in the _ga cookie?
b
we are only changing client_id value. so that the cookie related to client_id will be changed
a
OK thanks. So what happens now if I send through a Google Analytics clientId property in the "integrations" object? Will this now be ignored?
b
yes
only sessionId will be considered if you want to override it
a
And will this also work for server-side app events as well as client-side? i.e there is no need to ever set a clientID for GA anymore, only to make sure the Ruddersatck userID is set and that will always be sent to GA as the clientID, for both GA Universal and GA4?
b
for GA4 there is no need to set it, for GA we haven't changed anything so it will work as it was working
so maybe you can experiment it out i haven't done that
a
OK thanks will do. And finally, just to 100% confirm, there is no way to change the behaviour of Rudderstack to not update the _ga cookie with the Rudderstack ID? This is causing some problems with downstream systems so I wouldn't mind disabling until I've had time to test everything.
I tested the server-side event for Order Completed without any integration properties being sent. When looking at the live events sent to GA and GA4: • GA: Has a userId and the properties object doesn't contain a "cid" which I believe is usually where you set the client_id. So question is, will GA user userId as cid? • GA4: Does contain a client_id property in the event to GA4, however it is not set to the user_id - seems this must be generated by Rudderstack. So question is, how to define the client_id that should be sent to GA for server-side events?
@bulky-breakfast-19942 I got this working finally. So to close the loop (and for your own docs): 1. GA Universal does not automatically take the userId property from Rudderstack for server-side events (however, it seems to use it in the client-side Javascript SDK). 2. To solve this, you must send the "integrations" object in the Payload for Google Analytics, with clientId set to the Rudderstack UserID value. When you do this, GA sets the clientId to the userId. If you don't send it, the "sid" will be missing So for anyone sending server-side events to GA (for example an Order Completed event), you must send the integrations object and explicitly define the UserId as the clientId in the payload.
āœ… 1
šŸ™Œ 1