Skip to content

Instantly share code, notes, and snippets.

@uhhuhyeah
Created September 27, 2013 19:58
Show Gist options
  • Save uhhuhyeah/6734341 to your computer and use it in GitHub Desktop.
Save uhhuhyeah/6734341 to your computer and use it in GitHub Desktop.
Log what Optimizely experiments and variations you have been bucketed into
for (var i=0; i < window.optimizely.data.state.activeExperiments.length; i++) {
var experimentID = window.optimizely.data.state.activeExperiments[i];
var experimentName = window.optimizely.data.experiments[experimentID].name;
var variationName = window.optimizely.data.state.variationNamesMap[experimentID];
console.log(experimentName + " - " + variationName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment