Area: Optimizely Tracking
Applies to versions: Not applicable

Optimizely Tracking Developer Guide

Recommended reading 

Tracking in Optimizely is used to personalize content and product recommendations, and for segmented marketing actions. You can track data in Optimizely to any source. This section describes the core tracking functionality and APIs.

Getting started

Tracking consists of a service and a set of NuGet packages for the client-side tracking. As part of the onboarding, Optimizely sends the required configuration keys and credentials to the technical contact for your project.

How it works

To collect data about visitor interaction, tracking must be added to every content type of the website, such as pages, blocks, media, product category, products, variants. You can also add tracking to emails used in campaign mailings. 

Adding tracking can simply be done through decorating a content controller action method with an attribute. However, in most cases, more site-specific custom code is required to ensure that data for tracked events is collected correctly.

The collected data can be used for:

The tracking also supports tracking of data to any source outside the Optimizely platform.


The tracking service includes product-specific tracking for Optimizely CMS and Commerce, to support data visualization with different output platforms. To get tracking running for a site, you need to configure access to the tracking API. There are separate integration methods to connect with the tracking service, and separate native integrations depending on the product for which you are configuring tracking. See Install and configure personalization.

Installation and configuration

See Install and configure tracking about adding tracking to CMS and Commerce sites. 

Tracking API

See Tracking API about working with the generic tracking API.

Product-specific tracking types

The following tracking types are available:

  • CMS. Page views. See Page view tracking about setting up tracking for Optimizely CMS. 
  • Commerce. Home, Product, Category, Search, Wishlist, Basket, Checkout, and Order.
    See Product tracking about setting up product tracking for Optimizely Commerce
  • Campaign. Mailing Sent, Opens, and Clicks, for integrating with Optimizely Visitor Intelligence.

You can also develop custom tracking types.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Feb 06, 2019

Recommended reading