I’m evaluating Experiment for our needs and am trying to understand how to deal with following case:
User environment is mobile app. Suppose we’ve got a bunch of experiments set up. For some of them we need to get the assigned variant at app startup.
However, for some experiments we want to assign the variant only later - e.g. at screen #3. Our case in particular - we get ad attribution info with some delay and want to defer variant assignment for some experiments until then.
How would I set up Experiment and SDK integration to deal with this situation?
Related to above, if I understand the documentation correctly (looking at Android SDK docs ), once variants are fetched for the user then they are stored locally and never re-fetched. But what if I want variants to be re-assigned (as in situation above - user properties were updated) and “Sticky bucketing” is turned off for the experiment?
Best answer by tracy.guoView original
@mkuprionis - thanks for your question!
It’s true that the variants are stored locally, however you can call
fetch()again, as many times as needed, whenever you want to get the most up-to-date variants for the user.
Example: Let’s say you are running two experiments (E1) on your landing page and (E2) on your checkout page. (E2) targeting is based on whether or not the user is logged in. Both E1 and E2 have control and treatment variants
fetch()ed for the anonymous user:
E1=treatment(since user is not logged in, user is not considered for E2 (e.g. off)
fetch()with the new user ID:
In summary, you can call
fetch()at different times when you need to evaluate the user again.
In your case, since the user will have updated user properties the second time you fetch, I’d recommend explicitly including the user properties in the fetch call as well:
Let me know if that helps!
@tracy.guo, this helps!