I’ve setup the Rudderstack Javascript SDK in React...
# support
c
I’ve setup the Rudderstack Javascript SDK in React into a Hybrid Mode GA4 Destination, and am getting getting double the user count in GA4 realtime view. The only thing that I’ve been able to see that could cause this is looking at the Cloud events, I notice that sometimes my events will get forward 1st one event will send with
clientId
=
anonymousId
, and then following events will use the a
client_id = integrations."Google Analytics 4".clientId
. Does anyone know how to mitigate this?
b
can you check the
cid
value for page calls and rest of the calls is it the same ??
c
It looks like both the page and click calls have the anonid, and
integrations": { "All": true }
Then after a few requests, GA4 loads and it switch over when
Copy code
"integrations": {
   "All": true,
        "Google Analytics 4": {
            "clientId": "712601499.1676954047",
            "sessionId": "1676954046"
        }
    },`
Is there a way to pull up the GA4 clientID stuff, or can I force it on both device and cloud mode to use the anonID (perfered i think)?
b
we are working on fixing this issue, and we are going to map clientID with anonID across all modes, till then you can override clientId from integrationsObj
something like this
rudderanalytics.track(
"Sign Up",
{},
{
integrations: {
"Google Analytics 4": {
clientId: "G-389csDff",
},
},
}
);
c
What’s the ETA on the fix?
Also, not sure how it interacts; but my preference I think is anonID across the board.
b
you can expect around 1.5-2 weeks since we are revamping the ga4
in new changes clientId will be mapped to anonID across all modes
👍 1
c
Thanks, I am pushing this; Let me know if this is a bad idea for any reason.
Copy code
{
      integrations: {
        'Google Analytics 4': {
          clientId: window.rudderstack.getAnonymousId(),
        },
      },
    }
b
window.rudderanalytics.getAnonymousId()
yes, this will be fine there is no harm in this
c
I have it bound a little differently, but yeah
👍 1
Thanks for the quick help on this; Was able to get this out right before our press went live this morning.
🙌 1