RudderStack lets you send your web experimentation data to Optimizely Feature Experimentation via the cloud mode.

Find the open source transformer code for this destination in the GitHub repository.

Track

RudderStack uses the track call to send the experiment-related information to Optimizely. To do so, it uses Optimizely's track API.

You can view the metrics for an experiment either on the Results page of your Optimizely dashboard or as a data export. For more information, refer to the Viewing experimentation results section below.

A sample track call is shown below:

rudderanalytics.track(
"Product Added", {
item: "Tshirt",
currency: "USD"
})

Supported mappings

The following table lists the RudderStack event properties and their mappings with the Optimizely fields:

RudderStack propertyOptimizely propertyData type
event
Required
eventKeyString
userId
anonymousId
Required
userIdString
traits
context.traits
userAttributesObject
propertieseventTagsObject

Viewing experimentation results

To view the experimentation-related metrics in the Results page of your Optimizely dashboard, make sure you:

  • Use the activate API first and then send your track events. If you do not activate the user, the event won't be attributed to the user and won't be shown in the Results page.
  • Pass the same userId in your events that you pass to the activate API.

Page

You can use the page call to record your website's page views with any additional relevant information about the viewed page.

If you have enabled the Track Categorized Pages or Track Named Pages dashboard setting, then RudderStack sends every page call along with the page category or name as a track event to Optimizely, with the event name as Viewed ${category} page or Viewed ${name} page.

All the mappings supported for the track event are applicable for page event as well.

A sample page call is shown below:

rudderanalytics.page("home");

In the above snippet, home is the name of the web page. If Track Named Pages setting is enabled, RudderStack sends a track event named Viewed home page to Optimizely.

Screen

You can use the screen call to record your users' mobile screen views with any additional relevant information about the screen.

RudderStack sends every screen call you make as a track event to Optimizely, with the name Viewed ${name} screen - where name is the name of the viewed screen. If you do not provide any name, RudderStack sets the event name as Viewed screen.

All the mappings supported for the track event are applicable for screen event as well.

A sample screen call is shown below:

rudderanalytics.screen("Main");

In the above snippet, Main is the name of the app screen. RudderStack then sends a track event named Viewed Main screen to Optimizely.

FAQ

I am unable to see the events in my experiments. What should I do?

Define the custom events in your Optimizely Web dashboard and add those events as metrics in the corresponding Optimizely experiment.

While defining the custom event, make sure you also provide the API Name and while calling the track API, use this name as the name of your event.

For more information on creating custom events in Optimizely Web, refer to this Optimizely support article.


Contact us

For more information on the topics covered on this page, email us or start a conversation in our Slack community.

On this page