Skip to content

Instantly share code, notes, and snippets.

@asunwoo
Created October 26, 2017 22:30
Show Gist options
  • Save asunwoo/ba76f50121b5c9e755f689e21ba2db2d to your computer and use it in GitHub Desktop.
Save asunwoo/ba76f50121b5c9e755f689e21ba2db2d to your computer and use it in GitHub Desktop.
Variation variation = optimizely.activate("experiment_name", userId);
if (variation != null) {
if (variation.is("control")) {
// execute code for control
} else if (variation.is("variation")) {
// execute code for variation
}
} else {
// execute default code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment