Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Add events to experiments

This topic covers how to create and add an event key to your experiment in the Optimizely app.

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

Create an event in the Optimizely app

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

  1. Navigate to the Events dashboard and click New Event.
1317
  1. Define an event key, a unique identifier that you will reference in your code when you call Track.

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

In Event Tracking Code, Optimizely automatically populates example code for a Track call with your event key and a user_id.

  1. Click Save Event.
713

Add events to your experiment

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

  1. Navigate to Experiment>Metrics.
  2. Click the event you created, or click Create New Event.

Track events in your application code

For more information, see Track events.