Getting Started
Welcome to Experiment Plus! This guide will help you get up and running in minutes.
Prerequisites
- An Experiment Plus account
- An API key (available in your dashboard)
Installation
Install our SDK in your project:
bash
npm install @experiment-plus/sdkbash
yarn add @experiment-plus/sdkbash
pnpm add @experiment-plus/sdkQuick Setup
typescript
import { ExperimentPlus } from '@experiment-plus/sdk'
const client = new ExperimentPlus({
apiKey: 'your-api-key'
})
// Initialize with user context
await client.identify({
userId: 'user-123',
attributes: {
plan: 'pro',
country: 'US'
}
})
// Check a feature flag
const isEnabled = await client.isEnabled('new-checkout-flow')
if (isEnabled) {
// Show new checkout
} else {
// Show old checkout
}