Skip to main content

Optimizely

Web Source code Package Beta

Optimizely Feature Experimentation runs A/B tests and feature rollouts. This destination forwards walkerOS events to Optimizely as conversion events via the official @optimizely/optimizely-sdk v6 modular API, calling userContext.trackEvent(eventKey, eventTags) with optional revenue/value tags and user attributes.

Where this fits

Optimizely is a web destination in the walkerOS flow:

Installation

Loading...
Loading...

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
sdkKey*stringYour Optimizely Feature Experimentation SDK key. Find it in your Optimizely project under Settings > Environments.
userIdanywalkerOS mapping value to resolve userId for experiment bucketing. Example: "user.id" or { key: "user.id", value: "user.device" } for fallback.
attributesanyUser attributes for audience targeting. Resolves to Record<string, unknown>. Applied to every event via createUserContext().
updateIntervalintegerPolling interval for datafile updates in milliseconds. Default: 60000.
autoUpdatebooleanAuto-update datafile via polling. Default: true.
batchSizeintegerBatch event processor: number of events per batch. Default: 10.
flushIntervalintegerBatch event processor: flush interval in milliseconds. Default: 1000.
skipOdpbooleanSkip Optimizely Data Platform (ODP) manager initialization. Default: true. Set to false only if you use ODP.
* Required fields

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
eventKeystringOverride event key sent to Optimizely. If omitted, the walkerOS event name is used. Must match an event created in your Optimizely project.
revenueanyRevenue mapping. Resolves to an integer in cents (e.g. 7281 = $72.81). Passed as eventTags.revenue to trackEvent().
valueanyNumeric value mapping. Resolves to a float. Passed as eventTags.value to trackEvent().
eventTagsanyAdditional event tags. Resolves to Record<string, unknown>. Spread into the eventTags object passed to trackEvent().
attributesanyPer-event user attributes override. Resolves to Record<string, unknown>. Applied via setAttribute() before this event's trackEvent() call.

Examples

attributes only skip track

Event
Mapping
Out

consent granted

Event
Out

consent revoked

Event
Out

default event forwarding

Event
Out

mapped event name

Event
Mapping
Out

order complete revenue

Event
Mapping
Out

signup with attributes

Event
Mapping
Out

wildcard ignored

Event
Mapping
Out

Revenue

Optimizely expects revenue as an integer in cents (e.g. 7281 = $72.81). The destination passes the resolved value through without conversion. The caller must provide cents.

Two layers protect event delivery:

  1. config.consent: walkerOS gates delivery. Events are queued until required consent keys resolve to true.
  2. on('consent'): the destination closes the Optimizely client (flushing queued events and stopping datafile polling) when any required key flips to false. On re-grant, the next push re-initializes the client.
Loading...

Feature flags / decide()

This destination intentionally does not expose decide(). Experiment decisions belong in application code where UI branching happens. This package covers the outbound conversion-tracking use case.

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)