Optimizely

What Is Optimizely?

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


Capabilities

  • 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.

Considerations

  • 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.

Identity Sync

  • Sync Available: Yes
  • Required for Starter Kit: Yes
  • Prerequisites: Optimizely web tag deployed
  • Documentation: See Additional Optimizely Documentation

Sync Details

  • 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.

Starter Kit Setup Guide

1. Deploy the Optimizely Sync

  • To collect the sync value (optimizelyEndUserId), you must implement an Optimizely ID sync.

2. Gather Credentials

  • 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.

3. Add an Optimizely Integration

  • From the integration library, add an Optimizely integration. Then, fill out the Connection Parameters:
Connection ParameterDescription
ACCOUNT_IDString: Required. Optimizely account identifier used to associate events to your Optimizely project/account.

4. Configure Event Mapping

  • 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.

5. Deploy to Pipeline

  • In the Pipelines tab, add your Optimizely integration.
  • Select the correct integration revision
  • Click Add Integration to finalize deployment.

Event Mappings

Global

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 KeyDescriptionExpected Input
visitor_id RequiredString: Optimizely visitor identifier used to link events to a visitor.context.providers.optimizely.optimizelyEndUserId
attributesArray: Custom visitor attributes derived from traits as key/value pairs.Expression – converts input.traits into Optimizely attribute objects

Event Specific

Identify

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Page

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Products Searched

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Product List Viewed

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Product Clicked

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Product Viewed

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Product Added

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Product Removed

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Cart Viewed

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Checkout Started

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Payment Info Entered

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Order Completed

Output KeyDescriptionExpected Input
snapshots RequiredArray: 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

Required & Recommended Identifiers

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.

AttributeExampleSync Injector Required?
optimizelyEndUserId Requiredoeu1234567890123456r0.1234567890123456Yes

Integration Validation

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.


Additional Optimizely Documentation