Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

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

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,
  }
});