---
title: Push
slug: web-experimentation/api/vU0i-push
docTags: 
createdAt: 2026-08-05T20:56:13.000Z
---

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

The Web Experimentation JavaScript 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

```javascript
// ensures the optimizely object is defined globally
window['optimizely'] = window['optimizely'] || [];

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