Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

optimizely-server-sdk

optimizely35.3k1.5.0

Node SDK for Optimizely X Full Stack

optimizely

readme

Optimizely Node SDK

Build Status Coverage Status Known Vulnerabilities

This repository houses the Node SDK for Optimizely X Full Stack.

Getting Started

Installing the SDK

The SDK is available through npm. To install:

npm install optimizely-server-sdk --save

Using the SDK

See the Optimizely X Full Stack testing developer documentation to learn how to set up your first Node project and use the SDK.

Development

Installing dependencies

npm install

Unit tests

You can run all unit tests with:

npm test

Benchmarking tests

You can run benchmarking tests with:

npm run profile-test

Contributing

Please see CONTRIBUTING.

changelog


1.5.0

  • Implemented IP anonymization.
  • Implemented bucketing IDs.
  • Implemented notification listeners.

1.4.2

  • Bug fix to filter out undefined values in attributes and event tags

1.4.1

  • Remove a duplicated test

1.4.0

  • Add support for numeric metrics.
  • Add getForcedVariation and setForcedVariation methods for client-side variation setting
  • Bug fix for filtering out null attribute and event tag values

1.3.3

  • Removed JSON Schema Validator from Optimizely constructor
  • Minor bug fixes

1.3.2

  • Minor bug fixes
  • Updated SDK to use new event endpoint

1.3.1

  • Removed request-promise from dependencies
  • Moved bluebird to devDependencies

1.3.0

  • Introduced user profile service.
  • Minor performance and readibility improvements.

1.2.3

  • Switched to json-schema library which has a smaller footprint.
  • Refactored order of bucketing logic.
  • Refactor lodash dependencies.
  • Fixed error on validation for objects with undefined values for attributes.

1.2.2

  • Use the 'name' field for tracking event tags instead of 'id'.

1.2.1

  • Gracefully handle empty traffic allocation ranges.

1.2.0

  • Introduce support for event tags.
  • Add optional eventTags argument to track method signature.
  • Removed optional eventValue argument from track method signature.
  • Removed optional sessionId argument from activate and track method signatures.
  • Allow log level config on createInstance method


1.1.0

  • Add optional sessionId argument to activate and track method signatures.
  • Add sessionId and revision to event ticket.
  • Add 'Launched' status where user gets bucketed but event is not sent to Optimizely.


1.0.1

  • Fix bug so conversion event is not sent if user is not bucketed into any experiment.
  • Bump bluebird version from 3.3.5 to 3.4.6.
  • Update event endpoint from p13nlog.dz.optimizely to logx.optimizely.
  • Add copyright headers to each file.


1.0.0

  • Introduce support for Full Stack projects in Optimizely X with no breaking changes from previous version.
  • Introduce more graceful exception handling in instantiation and core methods.
  • Update whitelisting to take precedence over audience condition evaluation.
  • Fix bug activating/tracking with attributes not in the datafile.


0.1.4

  • Add functionality for New Optimizely endpoint.


0.1.3

  • Add environment detection to event builder so it can distinguish between events sent from node or the browser.


0.1.2

  • Update travis and coveralls settings post open sourcing.


0.1.1

  • Remove percentageIncluded field from JSON schema, which is not needed.


0.1.0

  • Beta release of the Node SDK for server-side testing.