Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function getABTest() {
var abTestName = '',
abTestVariation = '',
abTest = 'No test',
abTestExperiments = optimizely.allExperiments[Object.keys(optimizely.variationMap)];
if (abTestExperiments) {
abTestVariation = Object.keys(optimizely.variationNamesMap).map(function(el) { return optimizely.variationNamesMap[el]; })[0];
abTestName = abTestExperiments.name;
abTest = abTestName + ': ' + abTestVariation;
}
return abTest;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.