SDK Overview
Statsig's SDKs are the in-code tool you'll use to show experiment variants, flag your features, and log your key business metrics. Statsig's SDKs:
- Abstract the complexity away: we handle caching, retry mechanisms, networking, etc.
- Encourage best practice: built around parameters & language-specific best practice
- Broad deployment support: 30+ SDKs across clients, servers, the edge, and more.
When Will I Use the Statsig SDKs?
1. Targeting & Assignment
Decide in-code who sees new features and experiment variants. Target based on any user attributes (e.g., location, device type) or environment-level attributes, letting you fine-tune rollouts and experiment enrollment.
2. Logging Events
Log your key business metrics to power experiment & product analytics. Your events are piped into Statsig without any extra effort. For web-based platforms (e.g., JavaScript, React), Statsig also supports Autocaptured Events.
Choosing the Right SDK: Client vs. Server
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 work in real-time, providing instant feedback on user behavior.
-
Server-Side SDKs: Ideal for backend services, allowing you to control experiments, feature flags, and log server-side events. Server-side SDKs offer more control, especially for use cases involving system-level actions or business logic.
For a detailed comparison, refer to the Client vs Server SDK Overview.
Additionally, for frameworks like Next.js that bridge client and server-side logic, we offer guides like the Next.js SDK to help you integrate.
Client SDKs
Server Side SDKs
Next Steps: Installing 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 the setup, ensuring a smooth integration with your app.
- Start Experimenting: Once integrated, you can begin setting up feature flags, running experiments, and logging events for analysis.
If you run into any questions or need help with installation, feel free to reach out via our Slack Community.