- Optimizely Web Experimentation
- Optimizely Performance Edge
optimizely.get functions that let you see what is in your experiments and campaigns.
- Which experiments and campaigns are active on the current page
- Which variation you are bucketed into
This article provides a short list of the most common API calls and shows you how to use them.
- Open the developer console.
- Paste the API calls into the console.
window.optimizely, Optimizely Performance Edge uses
window.optimizelyEdge. See the Optimizely Performance Edge API Reference.
Common API calls
Returns an array of active experiment IDs on a page.
- In Optimizely Performance Edge, there are multiple experiments within a single campaign.
- In Optimizely Web Experimentation, there is only one experiment for each campaign.
Returns the revision that the snippet on the page is on. Useful in determining whether you are looking at the most updated changes made within a campaign.
Returns an object containing the mapping of all experiment variations a user is bucketed into in its lifetime. The experiment IDs are the object keys. The object contains the corresponding variation a user is bucketed into for each experiment, where the "id" and "name" values correspond to the variation.
Returns an object of the pages that are active on the URL you are on.