Faiz
Faiz

Reputation: 283

Optimizely experiment/variation id/name

I am trying to figure out where i can find the experiment_id, experiment_name, variation_id and variation_name on optimizely.

Upvotes: 1

Views: 279

Answers (1)

TomFuertes
TomFuertes

Reputation: 7270

If you're in the UI you can click options -> Diagnostic Report.

The experiment_id is also available in the URL of the editor window (?experiment_id=123456789)

If you're in js code you can access them through the optimizely.variationNamesMap[${experimentId}], optimizely.activeExperiments[${experimentId}], and optimizely.allExperiments[${experimentId}].

There is also a way to access them via the optimizely.data object.

lat name = window.optimizely.data.experiments[experimentId].name;
lat val = window.optimizely.variationNamesMap[experimentId];

Docs: https://help.optimizely.com/QA_Campaigns_and_Experiments/The_console,_data_object,_and_Optimizely_log

Upvotes: 2

Related Questions