Skip to main content

Everything you need to learn Optimizely X in one place: See our resource pages for Web Experimentation and Personalization.

Optimizely Knowledge Base

Create an event in Optimizely X Web

This article is about Optimizely X. If you're using Optimizely Classic, check this article out instead.
relevant products:
  • Optimizely X Web Personalization
  • Optimizely X Web Experimentation
  • Optimizely X Web Recommendations

  • Create an event in Optimizely X Web
  • Measure the impact of an experiment or campaign   

You can think of events as the “verbs” of Optimizely X. They track the actions that people take on your site, such as clicks, pageviews, form submissions, and purchases.

There are three kinds of behavior you can track:

  • Click events, which capture visitor clicks on elements like buttons or offers

  • Pageview events, which are tracked automatically for each page that you set up

  • Custom events, which capture additional information

Click events

Click Events capture visitor clicks on elements like buttons or offers. You create them on a page, and they inherit the URL targeting from that page.

Here's how you'd set up an "Added to cart" click event in the Editor.

  1. Click the CSS selector.

  2. Click Add an event.

  3. Categorize your event.

  4. Click Save

Track multiple selectors

You can track multiple CSS selectors in a click goal by comma-separating them (just like in Classic), but there is currently no multi-select capability.

Pageview events

Pageview events are added automatically for each page you create; no action is required from you. They can be viewed under the Events tab.

Custom events

Custom events capture additional information using custom code. You can use them to track behaviors like watching a video, submitting a form, or other actions that aren’t always reflected in clicks.

  1. Go to the Events tab and click New Custom Event.

  2. Categorize your new custom event. This will populate the API Call with the proper eventName, which you'll add to your site.

  3. Add the generated API call to your site. For more information on how you or your developer would implement this, see our developer documentation.