Install the JavaScript SDK v6
The steps necessary to install the Optimizely Feature Experimentation JavaScript (Browser) SDK into your application.
Warning
This content covers the Feature Experimentation JavaScript (Browser) SDK v6 features currently in pre-production testing and is subject to change before release
For the latest released version, see JavaScript (Browser) SDK.
The JavaScript (Browser) SDK can be used in Node, browser, React Native, and other platforms (using the universal bundle) and is distributed through npm.
Minimum SDK version
v6.0.0+
Install
Using npm
.
npm install --save @optimizely/optimizely-sdk
Using yarn
.
yarn add @optimizely/optimizely-sdk
Using pnpm
.
pnpm add @optimizely/optimizely-sdk
Using deno
(no installation required).
import optimizely from "npm:@optimizely/optimizely-sdk"
The full JavaScript SDK source code is available on GitHub.
Next
After installing, you must initialize the SDK.
Updated about 22 hours ago