Josh (the blog)

Hey there. I’m Josh, a SydneyCanberra-based maker of Internets. I don’t update this very often.


@joahua

Scraping active Optimizely experiments

Need to see what’s running?

I think Optimizely might’ve done something to make this tricker as an optional project setting, but it’s handy to be able to debug what’s running and possible splits.

Object.keys(optimizely.allExperiments).map(function(item){
item = optimizely.allExperiments[item];

if (!item.enabled) return;
console.log([item.name,'\n',item.variation_ids.map(function(v){
    return "\t" + item.variation_weights[v]/1000 + "%: " + optimizely.allVariations[v].name;
  })].join(''))
})

Paste in console.