Hey, I am using GrowthBook from Golang SDk. I want...
# announcements
f
Hey, I am using GrowthBook from Golang SDk. I wanted to know if I have to run the experiment for a particular user. How to provide the user information through code? For Example in the following image, the test-feature is like a killer switch. Suppose we want the killer switch to be ON for only User 123. what to do then?
f
Hi Star - you can do that
you would set the attribute in the SDK
and then in the UI, make sure to add that attribute from the features -> attributes page, then you can target with that value directly from a feature flag, or by using saved groups
f
ok, so like for a group of users on which the experimentation is run, we need to assign some attribute to those groups of users, and based on that we can make a decision.
Also where will this bunch of users store? So correct me if I am wrong, I will retrieve the user from the database and check if the user is in a particular group. And then attribute
WithAttributes{ user_id="xyz"}
and then in the targeting rule
Also, THERE CANNOT BE A PHASED ROLLOUT FOR THE BUNCH OF USERS. Like for 100 users only 60% of them should see a feature A and for 40% it should see the feature B
f
yes, you can do that too
within one rollout rule, you can also add targeting, so it would roll out to 40% of users who match some condition