npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@walkeros/web-destination-optimizely

v3.4.2

Published

Optimizely Feature Experimentation web destination for walkerOS (conversion tracking, revenue metrics, user targeting)

Readme

@walkeros/web-destination-optimizely

Optimizely Feature Experimentation web destination for walkerOS. Forwards conversion events to Optimizely via the official @optimizely/optimizely-sdk v6 modular API with support for revenue/value event tags, user targeting attributes, and consent-based client lifecycle.

Installation

npm install @walkeros/web-destination-optimizely

Quick Start

{
  "destinations": {
    "optimizely": {
      "package": "@walkeros/web-destination-optimizely",
      "config": {
        "consent": { "analytics": true },
        "settings": {
          "sdkKey": "YOUR_SDK_KEY",
          "userId": "user.id"
        }
      }
    }
  }
}

Programmatic:

import { startFlow } from '@walkeros/collector';
import destinationOptimizely from '@walkeros/web-destination-optimizely';

const { elb } = await startFlow();

elb('walker destination', destinationOptimizely, {
  consent: { analytics: true },
  settings: {
    sdkKey: 'YOUR_SDK_KEY',
    userId: 'user.id',
  },
});

Settings

| Key | Type | Default | Description | | ---------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------- | | sdkKey | string | — | Required. Optimizely Feature Experimentation SDK key (Settings > Environments). | | userId | Mapping | — | walkerOS mapping value resolving to the userId used for bucketing (e.g. "user.id"). Required per event. | | attributes | Mapping | — | Destination-level user attributes for audience targeting. Applied via createUserContext(). | | updateInterval | number | 60000 | Datafile polling interval (ms). | | autoUpdate | boolean | true | Poll for datafile updates. | | batchSize | number | 10 | Events per batch (batch event processor). | | flushInterval | number | 1000 | Batch flush interval (ms). | | skipOdp | boolean | true | Skip Optimizely Data Platform manager init. |

Mapping

Per-rule overrides under mapping.<entity>.<action>.settings:

| Key | Type | Description | | ------------ | --------- | --------------------------------------------------------------------------------------- | | eventKey | string | Override event key sent to Optimizely. If omitted, the walkerOS event name is used. | | revenue | Mapping | Resolves to integer cents. Passed as eventTags.revenue. | | value | Mapping | Resolves to a float. Passed as eventTags.value. | | eventTags | Mapping | Extra tags. Spread into the eventTags object. | | attributes | Mapping | Per-event user attributes. Applied via setAttribute() before the trackEvent() call. |

Use rule.name to rename the event key and rule.skip = true to fire attributes without a trackEvent() call.

Revenue

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

{
  "order": {
    "complete": {
      "name": "purchase",
      "settings": {
        "revenue": "data.revenue_cents",
        "value": "data.total"
      }
    }
  }
}

Consent

Two layers:

  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 polling) when any required key flips to false. On re-grant, the next push re-initializes the client.
"config": { "consent": { "analytics": true } }

Decide / Feature Flags

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.

License

MIT