Hello growthbook team,
I am trying to setup sticky bucketing in an experiment in an e-commerce based website. I already created an experiment with 3 cohorts and 1 control with user_id as primary hash attribute and anonymous visitor_id as fallback attribute.
Initially my users will be in non loggedin state when they first land on the website. So I assign a random visitor_id as fallback attribute and they get assigned a cohort C1. Once they login, their user_id gets available, so I set that in the attributes using setAttributes({...growthbook.getAttributes(), user_id: user id}). Still user is seeing cohort C1 which is expected.
However, once this same user lands on the website on different browser, he gets assigned separate visitor_id and different cohort C2. However, once they login, expectation is for them to revert back to C1 cohort as they had same user_id.
I also tried setting user_id manually for debugging with new visitor_id while init growthbook sdk in different browser. It still was assigning random cohort on each new browser/new incognito tab