https://www.growthbook.io/ logo
#announcements
Title
# announcements
f

fancy-zoo-90893

04/11/2022, 7:47 PM
I've been seeing this a lot so I was curious if there are any best practices to avoid this.
I'm using the React hook so ideally there shouldn't be any reason people see multiple variations.
However, I have two components in different places (and therefore different files) where the same experiment is run. So I'm guessing that in one place it's A and in another, B?
I would have thought that Growthbook will cache this somehow in memory so if two components try to
useFeature
for the same experiment, they would see the same result?
f

future-teacher-7046

04/11/2022, 7:53 PM
That warning usually happens when you are using different user ids when splitting traffic and during analysis. For example, if you split traffic based on ip address, but then analyze results based on a logged-in user id. What library are you using to track user events?
f

fancy-zoo-90893

04/11/2022, 7:59 PM
We use Segment to track events. You're right, the user ID system is pretty hacky currently but it's defined in Next.js's
_app.ts
so I figured it'd be the same for all components. We just create a random ID, store it as a cookie, and use that for subsequent refreshes.
But the Segment ID is different. Maybe we should just use that directly so it's consistent?
f

fresh-football-47124

04/12/2022, 6:19 AM
yes, I think it would
you might want to try to figure out how thats happening - might be effecting more than just GrowthBook - like if people are clearing just one of the cookies
14 Views