I've been seeing this a lot so I was curious if th...
# announcements
f
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
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
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
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