We're using Google Analytics 4 in Hybrid mode, usi...
# support
m
We're using Google Analytics 4 in Hybrid mode, using gtag Automated Capture for page views with "Override gtag client ID & session ID" turned on. We use a subdomain for our signup flow, but our landing pages are on the primary domain. I can confirm our Rudderstack events definitely retain the same anonymous ID across page views. We have now set it up so that all the events are client-side SDK events (rather than server-side) so that they collect anonymous ID and other context traits. However, in GA4, almost all of the events on the app flow subdomain are getting attributed as direct traffic, not matching up the signed-up user IDs with their anonymous IDs, even if, when I look at the original Rudderstack events, they are clearly coming via the primary domain. It looks like the GA4 Client ID is not actually being overridden by the Rudderstack IDs. I can see also that, when I look at the cookies in DevTools, there's no rs_ga ones, so it doesn't appear to be correctly adding the rs_ prefix, even though I've turned on the override option. Can I get some help with this issue?
Additional info - When I look at the user explorer in Google Analytics, it appears to be replacing their app instance ID with their user ID - not sure if this is related.
I can see also that we don't have any rs_ga cokies, even though I've turned on the override option.
s
Hello @mammoth-answer-4269 can you share the URL links of these pages so that we can check from our side
m
s
Hey @mammoth-answer-4269 it seems we found the issue We see an error happening when the GA4 sdk is getting initialised it is unable to resolve the sessionId and the anonymousId of
rudderstack
during init and hence it is sending the data with ga4 generated
clientId
and
sessionId
which is causing skewness. It seems you have instrumented npm version of JS SDK on the app flow where npm version is 2.21.0 which quite a bit behind latest. The GA4 integration stub is requesting a feature from the core sdk which not available in this version hence this issue is happening. I would suggest you to upgrade the npm version to latest on this app flow website for Rudder JS SDK to resolve this issue
🙌 1
m
Thanks so much! Really appreciate the help & will pass on to the engineering team.