HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Push

This topic describes the optimizely.push API function that updates the state of Optimizely in the browser.

The API has an 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,
  }
});