Skip to content

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/sdk
bash
yarn add @experiment-plus/sdk
bash
pnpm add @experiment-plus/sdk

Quick 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
}

Next Steps

Built with VitePress