Manage events in Feature Experimentation

  • Updated
  • 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.

Create event

  1. Go to Events and click Create New Event. Create New Event from Events tab
  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). 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.

      You can edit the pre-filled Event Key field.

    3. (Optional) A Description.
  3. (Optional) Configure event properties.

Event properties let you track and view additional information on the Optimizely Experimentation Results page 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. 

Select any Default Properties

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. 

    Create Custom Properties
  4. Click Create Event.

With the REST API

See Create a 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.
  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 projects.Select Metrics drop-down list to add events

See 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.

Create metrics

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.