Table of Contents
- Optimizely Web Experimentation
- Optimizely Performance Edge
- Optimizely Full Stack
- Use click, custom, and pageview events to track visitor behaviors on your site.
- Measure the impact of your experiments and campaigns.
Events are the verbs of Optimizely experiments and campaigns that allow you to track actions that a visitor takes, such as clicks, pageviews, form submissions, and purchases.
For example, you might set up a click event that tracks clicks to a Contact Sales button on your homepage or application. Or, you might set up a custom event to track revenue through your checkout flow-based
If you use Optimizely to test on a checkout page, you might need to configure your site for PCI compliance.
Events are reusable, so you can quickly add them to any campaign or experiment that you build.
Types of Events
You can build the following types of events in Optimizely Web:
Click events capture visitor clicks on elements like buttons or offers. You create click events on a page, and they inherit URL targeting from that page.
Custom events capture additional information using custom code. You can use custom events to track behaviors like watching a video, submitting a form, browsing image 6 in a photo carousel and other actions that are not always reflected in clicks.
Pageview events are tracked automatically for each page that you set up.
In Optimizely Full Stack, you can track any type of user event from your application. First, you create an event tag string in the Optimizely application. Then, use the
track()method from the Optimizely SDK and pass in the key for the event you created.
Learn how to implement the
track() event method in Optimizely Full Stack:
- Android SDK
- C# SDK
- Go SDK
- Java SDK
- PHP SDK
- React SDK
- React Native SDK
- Ruby SDK
- Python SDK
- Swift SDK
How events are calculated
Like pages, events are restricted to individual projects. This means that you will set up, track and manage events in a single project (unless your Optimizely plan includes cross-project events for Web or cross-project events for Full Stack).
After you add an event to a campaign or experiment, it is called a metric. Metrics are displayed on your Results page and help you measure differences in visitor behavior, based on changes you make to your site in a variation in an experiment or personalized experience.
- The Results page for Optimizely Web Personalization
- The Experiment Results page for Optimizely
- Optimizely Reports Page for Full Stack 2.0 (Flags)
Events are always on. An event will begin tracking data when it is set up. If it is added as a metric to a running experiment, the data for the event is added retroactively: from the date the event was created or the date the experiment was published, whichever is more recent.
Learn more about how to:
- Set up a click or pageview event in Optimizely Web
- Set up a custom event in Optimizely Web
- Manage events in an Optimizely Web project
- Choose metrics
- Create revenue-tracking events in Optimizely Web
- Create Cross-project events in Optimizely Web (available for select plans)
- Create Cross-project events in Full Stack (available for select plans)
An important part of good experiment design is choosing the right events to track. This article discusses how to balance “macro” conversions like revenue with “micro” conversions to design an effective experiment.
Tracking an event across origins in Web
Sometimes, you may wish to track events across different origins. For example, you might want to have metrics that measure actions on http://shop.example.com and http://example.com. These are different origins, so you will need to set up cross-origin targeting in your Optimizely Web snippet. Otherwise, you will not see any data for cross-origin metrics on your Results page.
Events in Personalization
Use events in Personalization to behaviorally target campaigns and deliver personalized experiences.
Events are always on. They constantly gather information on the behaviors that you identified, even if you have not created a campaign or connected events with an existing campaign. This is useful when you use Optimizely Web Personalization.
If you use Personalization, always-on events help you create audiences based on behavior. For example, you can target visitors who triggered a certain event over a certain time period, such as “People who searched 2+ times in the last 30 days.” You can also target more specific behaviors with tags.