This message was deleted.
# ask-questions
w
This message was deleted.
f
I'm not an expert in Java - are you setting any attributes?
g
yes , i want to pass attribute like user_id, mobile etc
f
attributesJson() - that's probably it. You're doing inline experiments with the conditionJson, not sure if you mean to do that
are you reading the docs here? https://docs.growthbook.io/lib/java
g
yes , referring same doc and looking for Inline Experiments
Just help me with the code snippet in Java, how to get experiment variant
f
The way GrowthBook works is with deterministic hashing - so you have to give it some kind of attribute to bucket on, or to target to
for instance, in your inline experiment there, you're targeting on id - but you are not defining what id are the users are
g
If we have attributes like "id, mobile, and city" and an experiment named "click_test" with the Assignment Attribute set as "id" and variants configured as "control, two_click, three_click" --- Now i have two input attribute 1. id = 123, mobile= 99999999 and city = New York 2. id = 456, mobile= 88888888 and city = Washington ----- Based on GrowthBook hashing on Id , suppose 1st data (id= 123) is returning "control" variant of experiment and 2nd data (id= 456) is returning "two_click" variant of experiment ---- Basically how to get experiment variants (control, two_click, three_click ) by passing input attribute wrt Java
f
ya, you can do that
g
can you share Java code snippet to achieve the requirement ^^
138 Views