-
-
Save jamesspittal/d153f3d62d465ed9e5974c903336189b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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