Using the JavaScript SDK
With yournew-feature flag created, bring it into your app with the JavaScript SDK.
Check out our other SDKs for Node.js, Next.js, React, and more.
Initialize the SDK
Create a client with your SDK key and a unique user identifier, such as user ID or email.
Evaluate Your Flag
Get the
new-feature flag’s value:Calling
flag() automatically logs an impression, tracking which variant each user sees—vital for metrics later.Next Steps
The SDK is ready—now track user actions:- Send events in Quickstart: Send Events.
- Explore targeting in Targeting & Rollouts.
- See other options in other SDKs