Hi, I am trying to setup experiment with GrowthBoo...
# announcements
p
Hi, I am trying to setup experiment with GrowthBook. I have setup an experiment https://app.growthbook.io/experiment/exp_19g61tlmreelej When I try to fetch the value in my test, it always return the same value. Is it because I did not set a user ID with GrowthBook yet? would all the anonymous user always get the same value in experiment?
w
Yes. Growthbook hashes based upon the assignment attribute and the feature key. If you don't change the assignment attribute ever then the hash will be the same and it will get the same value.
p
what would be the suggested way for me to handle anonymous user? We have a large amount of pages that user will stay anonymous
and when user eventually logged in and have a user id, would the value be switched to another value after I submit their ID?
w
You should target your experiment then to an anonymous id
p
would that be deviceId?
w
for GA4? Yes.
p
Sorry I was referring deviceId in here
w
You can check out your datasource page to see if both anonymous_id and user_id have been set up.
Yes device_id should be the anonymous one.
It will then stay consistent between the logged in and logged out cases.
p
Thanks, that sounds like the plan
I do not have data sources set up yet
would the experiment splitting work on its own?
w
Yes as long as that attribute gets set when Growthbook gets instantiated.
p
I see, so I will have to set it, otherwise it will not work? I was using google optimize and they set one on their own
w
There is a video here that explains moving over from google optimize: https://docs.growthbook.io/guide/GA4-google-analytics