Rich-text Reply

Anyone else missing experiment/variation names in Optimizely X?

santhony7 02-27-17
Accepted Solution

Anyone else missing experiment/variation names in Optimizely X?

var exprs = window.optimizely.get("state").getActiveExperimentIds();
            for (var i = exprs.length - 1; i >= 0; i--) {

                var exp = exprs[i];
                console.log(window.optimizely.get("data").experiments[exp].name);
                console.log(window.optimizely.get("state").getVariationMap()[exp].name);
            }

Both coming back as null

Anthony Smith
JasonDahlin 02-27-17
 

Re: Anyone else missing experiment/variation names in Optimizely X?

i'm not an Optimziely X user, but have you tried lookign in Campaigns instead?

(function(){
  try {
    var exprs = window.optimizely.get("state").getCampaignStates();
    expList = [];
    $.each(exprs, function(i){
      expList.push( exprs[i].experiment.name + ':' +  exprs[i].variation.name);
    })
    return expList.toString();
  } catch(e) {}
})();

 

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
santhony7 02-27-17
 

Re: Anyone else missing experiment/variation names in Optimizely X?

Still not there.1488221851.png

Anthony Smith
Highlighted
JasonDahlin 02-27-17
 

Re: Anyone else missing experiment/variation names in Optimizely X?

Ah - you must have "mask descriptive names" enabled.

On your "Home" page, click "Settings" then select "Privacy" - see if you have the checkbox checked for "Mask descriptive names in project code and third-party integrations".

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
santhony7 02-27-17
 

Re: Anyone else missing experiment/variation names in Optimizely X?

Nailed it! Thanks.
Anthony Smith