---
title: Manage events in Feature Experimentation
slug: feature-experimentation/docs/manage-events-in-feature-experimentation
docTags: 
createdAt: 2026-08-05T20:39:51.000Z
---

- Optimizely Feature Experimentation

[Events](#) track the success of your experiment by recording specific user actions, such as clicks, pageviews, form submissions, purchases, and scroll depth. To integrate events into your application code using the SDK, see [Track events](https://docs.developers.optimizely.com/feature-experimentation/docs/track-events).

## Create event

1. Go to **Events** and click **Create New Event**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/a-SkKrSmZsSJNchKubU4f_events-create-new-event-button-on-events-list.png)

2. Enter the following:
   1. An **Event Name**.
   2. (Optional) An **Event Key** (a unique identifier you will reference in your code when you call [track event method](https://docs.developers.optimizely.com/feature-experimentation/docs/track-events)). Event keys are automatically populated based on the **Event Name** with the following updates:

      - Uppercase characters are converted to lowercase.
      - Non-alphanumeric characters are replaced with underscores.

      :::hint{type="info"}
      **Note**

      You can edit the pre-filled **Event Key** field.
      :::
   3. (Optional) A **Description**.
3. (Optional) Configure [event properties](https://docs.developers.optimizely.com/feature-experimentation/docs/track-events#event-properties).

:::hint{type="info"}
**Note**

Event properties let you track and view additional information on [the Optimizely Experimentation Results page](https://docs.developers.optimizely.com/feature-experimentation/docs/analyze-results) and use it to disassemble and analyze your events more in-depth. You can have 15 properties total, including built-in and custom properties.
:::

**Default properties**

Select any of the built-in properties to add it to the event.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/IV7WFdhyOCT1obP_IeSJr_create-event-create-event-dialog-with-default-properties.png)

**Custom properties**

1. Click **Add custom property**.
2. Enter a name.
3. Select the type of custom property from the data type drop-down list.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/NELrHaDHrOHR0wPj8USnd_create-event-custom-properties-data-type-options.png)

4. Click **Create Event**.

### With the REST API

See [Create a custom event](https://docs.developers.optimizely.com/feature-experimentation/reference/create_custom_event) in the Optimizely REST API reference documentation for information on creating an event using the REST API.

## Add events to your experiments

To add an event to your experiment in the Optimizely Experimentation UI, complete the following:

1. Go to **Flags** and select a flag.
2. Select the environment and click the rule to which you want to add an event.
3. Add the event to the rule in the form of a [metric](https://docs.developers.optimizely.com/feature-experimentation/docs/choose-metrics).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/D934Ti2A4Q45dztjbtPmg_ruleset-development-flag-ruleset-metrics-panel.png)

4. Select the event you created earlier in the **Metrics** field or click **Create new event**. Click **All projects** to see events from your Feature Experimentation and [Web Experimentation](https://www.optimizely.com/products/web-experimentation/) projects.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/GNXwrEAnY-2jAxkHTT_ms_add-metric-add-metric-dialog-with-event-picker.png)

See [Run A/B tests](https://docs.developers.optimizely.com/feature-experimentation/docs/run-a-b-tests) for information on creating an A/B test rule.

## Track events in your application code

See the track event documentation in your SDK to implement event tracking in your code.

- [Android](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-android)
- [C#](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-csharp)
- [Flutter](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-flutter)
- [Go](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-go)
- [Java](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-java)
- [JavaScript](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-for-the-javascript-sdk) – SDK versions 6.0.0 and later.
- [JavaScript (Browser)](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-javascript-prior-to-v6) – SDK versions 5.3.5 and earlier.
- [JavaScript (Node)](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-javascript-node-prior-to-v6) – SDK versions 5.3.5 and earlier.
- [PHP](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-php)
- [Ruby](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-ruby)
- [Python](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-python)
- [Swift](https://docs.developers.optimizely.com/feature-experimentation/docs/track-event-swift)

## Create metrics

[Metrics](https://docs.developers.optimizely.com/feature-experimentation/docs/choose-metrics) measure the success of your experiment by telling you whether an experiment is winning, losing, or inconclusive. Metrics are derived from events, which directly track actions like clicks, pageviews, form submissions, purchases, and scroll depth.

Optimizely Feature Experimentation uses a natural-language metrics builder in the UI that lets you define and add metrics to your experiments and campaigns. See [Create a metric in Optimizely using the metric builder](#) for instructions on creating metrics in Feature Experimentation.
