Skip to content

Quick Start

Get your first feature flag running in under 5 minutes.

1. Create a Flag

In your dashboard, create a new feature flag:

  1. Go to FlagsNew Flag
  2. Name it my-first-flag
  3. Set targeting rules (or leave as default)
  4. Save and enable

2. Install SDK

bash
npm install @experiment-plus/sdk

3. Use the Flag

typescript
import { ExperimentPlus } from '@experiment-plus/sdk'

const client = new ExperimentPlus({
  apiKey: process.env.EXPERIMENT_PLUS_API_KEY
})

// Check the flag
const enabled = await client.isEnabled('my-first-flag', {
  userId: 'user-123'
})

console.log('Flag enabled:', enabled)

4. Track Events

typescript
// Track when users interact with your feature
await client.track('button_clicked', {
  userId: 'user-123',
  properties: {
    variant: 'new-design'
  }
})

That's it! You're now running your first experiment.

Built with VitePress