Optimizely is an experimentation and feature delivery platform that helps teams test, personalize, and optimize digital experiences across web and mobile properties. It enables organizations to run A/B tests, multivariate experiments, and feature flag rollouts to understand user behavior and improve conversion outcomes.
Product Type: Experiment/Analytics
Integration Type: Starter Kit & ID Sync
Event Source Type: Web
Event Scope: Full-Funnel Events
- Sends server-side visitor events to Optimizely’s Event API endpoint.
- Supports full-funnel event coverage, including identify and key e-commerce events.
- Maps user traits into Optimizely visitor attributes as custom key/value pairs.
- Supports event properties for downstream reporting in Optimizely.
- This is a hybrid setup that relies on the Optimizely web tag to generate the
optimizelyEndUserId.
- Events are only allowed when
context.providers.optimizely.optimizelyEndUserId is present; events without this identifier will be blocked by default.
- Please implement and maintain the Optimizely tag on all pages where experiments or feature flags are running.
- If the Optimizely tag is not present on a page, the
optimizelyEndUserId will not be set and the MetaRouter sync will not capture or refresh the identifier.
- Each event sent to Optimizely must use the correct Optimizely event
entity_id; replace ADD_YOUR_EVENT_ID_HERE with the event ID from the Optimizely UI.
- Sync Available: Yes
- Required for Starter Kit: Yes
- Prerequisites: Optimizely web tag deployed
- Documentation: See Additional Optimizely Documentation
- Captures the Optimizely end-user identifier from a first-party cookie for server-side event linking.
- Required to associate server-side events to the correct Optimizely visitor.
- To collect the sync value (
optimizelyEndUserId), you must implement an Optimizely ID sync.
- Gather the following:
- Account ID – See instructions here
- Entity IDs – IDs corresponding to each Optimizely event.
- You can find these under the Implementation tab in the Optimizely UI.
- Ensure each Entity ID is added to the
entity_id field inside the snapshots expression for the corresponding event in the starter kit.
- From the integration library, add an Optimizely integration. Then, fill out the Connection Parameters:
| Connection Parameter | Description |
|---|
ACCOUNT_ID | String: Required. Optimizely account identifier used to associate events to your Optimizely project/account. |
- MetaRouter provides all of the event mappings that Optimizely integrations typically require. You may add custom events, parameters, or mappings in accordance with Optimizely’s API documentation.
- In the Pipelines tab, add your Optimizely integration.
- Select the correct integration revision
- Click Add Integration to finalize deployment.
Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.
| Output Key | Description | Expected Input |
|---|
visitor_id Required | String: Optimizely visitor identifier used to link events to a visitor. | context.providers.optimizely.optimizelyEndUserId |
attributes | Array: Custom visitor attributes derived from traits as key/value pairs. | Expression – converts input.traits into Optimizely attribute objects |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing an identify event with timestamp, uuid, and entity_id. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a page event with tags from event properties. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, input.properties, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a products_searched event with tags from event properties. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, input.properties, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a product_list_viewed event with tags from event properties. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, input.properties, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a product_clicked event with tags from event properties. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, input.properties, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a product_viewed event with revenue (cents) and tags. | Expression – builds from input.properties totals, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a product_added event with quantity, revenue (cents), and tags. | Expression – builds from input.properties.quantity, totals, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a product_removed event with quantity and tags. | Expression – builds from input.properties.quantity, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a cart_viewed event with revenue (cents) and tags. | Expression – builds from input.properties.products totals, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a checkout_started event with revenue (cents) and tags. | Expression – builds from input.properties.products totals, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing a payment_info_entered event with tags from event properties. | Expression – builds from input.timestamp/input.receivedAt, input.messageId, input.properties, and entity_id placeholder |
| Output Key | Description | Expected Input |
|---|
snapshots Required | Array: Snapshot payload containing an order_completed event with revenue (cents) and tags. | Expression – builds from input.properties.products totals, plus input.timestamp/input.receivedAt, input.messageId, and entity_id placeholder |
These identifiers must be mapped to Optimizely in order for successful user matching to occur. Without these IDs, any events sent to Optimizely may not be accurately reflected in reporting.
| Attribute | Example | Sync Injector Required? |
|---|
optimizelyEndUserId Required | oeu1234567890123456r0.1234567890123456 | Yes |
You can validate the integration by navigating to the Experiment Results page in the Optimizely dashboard. Confirm that visitors and events are appearing for active experiments or feature flags, and that metrics update as expected after triggering mapped events.