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.
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 property | Optimizely property | Data type |
---|---|---|
event Required | eventKey | String |
userId anonymousId Required | userId | String |
traits context.traits | userAttributes | Object |
properties | eventTags | Object |
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 yourtrack
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 theactivate
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
.
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
.
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.