The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Describe experiments running on the page, indexed by experiment ID.

window.optimizelyEdge.get('state').getActiveExperiments()
> {'123': {id: '123', name: 'Landing Page Experiment', variation: {id: '456', name: 'New CTA Text'}}

Parameters

None

Returns

An object mapping experiment ID (key) to experiment object (see below)

ParameterTypeDescription
experimentobjectDescription of the experiment
experiment.idstringID of the experiment
experiment.namestring | nullDescriptive name of the experiment, set in Optimizely Performance Edge. If the "Mask Descriptive Names" feature is enabled, this is null.
experiment.variationobjectDescription of the selected variation
experiment.variation.idstringID of the selected variation
experiment.variation.namestring | nullDescriptive name of the variation, set in Optimizely Performance Edge. If the "Mask Descriptive Names" feature is enabled, this is null.