On this page

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.

For a detailed comparison, go to the Client vs Server SDK Overview.For frameworks like Next.js that bridge client and server-side logic, go to the Next.js SDK guide.

Available SDKs

Statsig offers SDKs for a wide variety of platforms:

Client SDKs

Server side SDKs


Install your SDK

  1. Select your SDK: Choose the client or server SDK that fits your platform from the lists above.
  2. Follow the installation guide: Each SDK has an installation guide that walks you through setup.
  3. Start experimenting: After you integrate the SDK, set up feature flags, run experiments, and log events for analysis.
If you have questions or need help with installation, reach out in the Slack community.

Was this helpful?