Optimizely
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.
Optimizely is a web destination in the walkerOS flow:
Installation
- Integrated
- Bundled
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
| Property | Type | Description | More |
|---|---|---|---|
sdkKey | string | Your Optimizely Feature Experimentation SDK key. Find it in your Optimizely project under Settings > Environments. | |
userId | any | walkerOS mapping value to resolve userId for experiment bucketing. Example: "user.id" or { key: "user.id", value: "user.device" } for fallback. | |
attributes | any | User attributes for audience targeting. Resolves to Record<string, unknown>. Applied to every event via createUserContext(). | |
updateInterval | integer | Polling interval for datafile updates in milliseconds. Default: 60000. | |
autoUpdate | boolean | Auto-update datafile via polling. Default: true. | |
batchSize | integer | Batch event processor: number of events per batch. Default: 10. | |
flushInterval | integer | Batch event processor: flush interval in milliseconds. Default: 1000. | |
skipOdp | boolean | Skip Optimizely Data Platform (ODP) manager initialization. Default: true. Set to false only if you use ODP. |
Mapping
Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.
| Property | Type | Description | More |
|---|---|---|---|
eventKey | string | Override event key sent to Optimizely. If omitted, the walkerOS event name is used. Must match an event created in your Optimizely project. | |
revenue | any | Revenue mapping. Resolves to an integer in cents (e.g. 7281 = $72.81). Passed as eventTags.revenue to trackEvent(). | |
value | any | Numeric value mapping. Resolves to a float. Passed as eventTags.value to trackEvent(). | |
eventTags | any | Additional event tags. Resolves to Record<string, unknown>. Spread into the eventTags object passed to trackEvent(). | |
attributes | any | Per-event user attributes override. Resolves to Record<string, unknown>. Applied via setAttribute() before this event's trackEvent() call. |
Examples
Attributes only
A profile update sets Optimizely user attributes without firing a trackEvent for user enrichment.
Consent revoked
A walker consent command with analytics denied closes the Optimizely client and flushes queued events.
Default event
A walker event becomes an Optimizely trackEvent call with the event name and empty eventTags.
Mapped event key
A mapping renames the walker event to an Optimizely event key defined in the project.
Purchase revenue
An order fires an Optimizely purchase event with revenue in cents, value, and additional event tags.
Signup with attributes
A user signup sets per-event Optimizely attributes via setAttribute before firing the trackEvent.
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.
Consent
Two layers protect event delivery:
config.consent: walkerOS gates delivery. Events are queued until required consent keys resolve totrue.on('consent'): the destination closes the Optimizely client (flushing queued events and stopping datafile polling) when any required key flips tofalse. On re-grant, the next push re-initializes the client.
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.