SDK Overview
Get started with a Statsig SDK by choosing your platform, installing the package, initializing with your API key, and evaluating your first gate.
Statsig's SDKs are the in-code tool you'll use to show experiment variants, flag features, and log key business metrics. Statsig's SDKs:
- Abstract the complexity: Statsig handles caching, retry mechanisms, and networking.
- Encourage best practices: Built around parameters and language-specific best practices.
- Broad deployment support: 30+ SDKs across clients, servers, the edge, and more.
When to use Statsig SDKs
1. Targeting and assignment
Decide in code who sees new features and experiment variants. Target based on any user attributes (for example, location or device type) or environment-level attributes to control rollouts and experiment enrollment.
2. Logging events
Log key business metrics to power experiment and product analytics. Events flow into Statsig automatically. For web-based platforms (for example, JavaScript, React), Statsig also supports Autocaptured events.
Choose between client and server SDKs
Statsig offers both client-side and server-side SDKs, each suited to different use cases:
Client-side SDKs: Designed for user-facing applications where events are logged directly from the browser or mobile app. These SDKs operate in real time and provide instant feedback on user behavior.
Server-side SDKs: Designed for backend services. Use server-side SDKs to control experiments, feature flags, and log server-side events. Server-side SDKs provide more control for use cases involving system-level actions or business logic.
Available SDKs
Statsig offers SDKs for a wide variety of platforms:
Client SDKs
Browser JavaScript
Client-Side React
Bare React Native SDK
Next.js SSR, SSG & Client-Side
Angular bindings for Javascript SDK
iOS, MacOS, tvOS SDK
Android Kotlin/Java SDK
Client SDK for .NET framework
Roku Brightscript SDK
Unity game engine SDK
Flutter/Dart Mobile App SDK
C++ client-side SDK
Server side SDKs
Node.js server SDK
Java server SDK
Python server SDK
Go server SDK
Ruby server SDK
.NET server SDK
PHP server SDK
Rust server SDK
C++ server SDK
Install your SDK
- Select your SDK: Choose the client or server SDK that fits your platform from the lists above.
- Follow the installation guide: Each SDK has an installation guide that walks you through setup.
- Start experimenting: After you integrate the SDK, set up feature flags, run experiments, and log events for analysis.
Was this helpful?