The API has a optimizely.push function you call passing in an object containing a type property and additional parameters. With this function you can update the state of Optimizely in the browser.

Usage

window["optimizely"].push({
  type: "event",
  eventName: "watchedVideo",
  tags: { // Additional metadata for targeting (optional)
    title: "Funny Cats",
    duration: 30,
  }
});

Did this page help you?