Hi everyone, I have issues with segment overlap wh...
# ask-questions
p
Hi everyone, I have issues with segment overlap when analysing experiments in GA4, meaning GA4 indicates that users are both seeing the control and variant in my experiments (obviously a huge issue). Have anyone else experienced this and solved it? I have already tried giving each variant a specific variation ID but without success. Could it be because I haven't setup tracking directly in GB?
r
Hi there! How have you configured the tracking callback in your app?
p
Hey Ryan, I have attached an image of the script in our source code of the website. From the documentation, it seem that I need to add the trackingCallback here? Or would it be enough to add it through GTM perhaps?? 🙂
f
that script will track to ga4 if it finds it
what is the sample size?
what we do is if you don't set an attribute to use for randomization, we create one. You could get this warning if somehow that ID was not being saved correctly
you can check the health report from GrowthBook - it would be good to see what percentage of multiple exposure there is
p
Hey @fresh-football-47124, Thanks for the answer. 1) The sample size is ~60k users in each variant (120k total), but the same occurs in other tests with fx ~200k users per variant. 2) Not sure how I set an attribute for randomization. In my experiments, I have set the Assignment Attribute to either "deviceId" or just "id". If I want to target mobile devices inly, I set the Attribute targeting to "deviceType is equal to mobile" Is this correct/what you're looking for? 3) I can't access the health report - maybe because Google Analytics is my only data source? In GA4, it is ~17% of all users that is exposed to both control and variant.
f
the assignment attribute is the randomization unit
These are from the same experiment with id or device id? is there a difference for experiments with different assignment attributes?
p
No it's for different experiments, and I see issues in both cases - and for both my clients that use Growthbook.. Could it be something about the Tracking Callback maybe?
f
different experiments will re-randomize
p
The issue is that some users appear to see both versions of our test, according to data from both GA4 and BigQuery. This makes it impossible to attribute their transactions to a specific variant. While the user randomization seems to work correctly, it seems that GB doesn't remember users properly, causing them to see the wrong variant after already seeing the other one. I haven't been able to find a solution for this problem.
a
@strong-mouse-55694 Picking this up again 😄 Can you point to some documentation or screenshot a working config in terms of the id's used for allocation, just to sanity check our setup. Users clearing cookies shouldn't have this effect, as they'd most often clear ALL cookies and get reallocated as new users, blinding us to any overlap that might happen because of this.
s
I was OOO and missed this. The setup is dependent on your SDK language. Here's an example for Next.js, though, which might be helpful: This code shows the generation of an ID: https://github.com/growthbook/examples/blob/b5e9138064cb565ef2c7bea30b97bdbdb797f67e/next-js/src/middleware.ts#L8-L32 And here that ID is set as the attribute: https://github.com/growthbook/examples/blob/b5e9138064cb565ef2c7bea30b97bdbdb797f67e/next-js/src/app/client-optimized/ClientApp.tsx#L14-L27 GB will use this ID for experiment assignment.
a
@hundreds-easter-23383
👍 1