Dev guideAPI Reference
Dev guideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Create events

How to create and add an event key to your experiment in the Optimizely application for Optimizely Feature Experimentation.

For more information on how to integrate events into your application code with the SDK, see Track events.

Create an event key in the Optimizely Feature Experimentation app

To create an event that tracks user actions in the Optimizely Feature Experimentation app:

  1. Navigate to the Events tab and click Create New Event.
create new event

Create an event

  1. Enter the Event Name, Event Key (a unique identifier you will reference in your code when you call Track Event) and optionally a Description.

📘

Note

Event keys can contain spaces (unlike experiment keys) to conform to industry event-naming standards. Event keys must be unique for the project.

  1. Click Create Event.

Add events to your experiments

To add an event to your experiment in the Optimizely Feature Experimentation app:

  1. Navigate to Flags and select a flag.
  2. Select the environment your targeting and click the A/B test rule that you want to add an event to.
  3. In the Metrics field, select the event you created earlier, or click Create new event.
1150

Click to enlarge the image

See Run A/B tests for information on how to create an A/B test rule.

Track events in your application code

See the Track Event documentation in your preferred SDK to implement event tracking in your code: