Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideProduct feedbackGitHubNuGetDev CommunitySubmit a ticketLog In

Push

This topic describes the optimizely.push API function that updates the state of Optimizely Web Experimentation 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 Web Experimentation in the browser.

Usage

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