What SDKs Do
The SDK has two main responsibilities:- Fetch features from the API: The SDK downloads your feature definitions from GrowthBook and caches them for fast access.
- Evaluate features: Using attributes you provide (like user ID, country, or subscription plan), the SDK evaluates your targeting rules and returns the appropriate feature values. This evaluation happens wherever the SDK runs—in the browser, on your server, or at the edge.
Running Experiments
To measure experiment results, the SDK needs to log which variation was assigned. This is done through a tracking callback—a function you provide that sends assignment data via your event tracking system (like Segment, Mixpanel, or GA4). Without a tracking callback, the SDK will still assign variations and your features will work, but you won’t be able to analyze experiment results in GrowthBook. All SDKs use the same assignment logic, so the same attributes always produce the same variation regardless of which SDK you use. Each SDK has documentation on setting up tracking callbacks, and many offer pre-built integrations with popular analytics tools.Choosing the Right SDK
The main differences between SDK types are where they run and what problems they solve best.Client SDKs
Where they run: In the browser or mobile device Best for: UI changes, visual experiments, and frontend feature flags Trade-offs:- Easy integration with frontend frameworks
- Feature rules are visible to users (see remote evaluation if you need to keep rules private)
- Can show a brief flicker while experiments load asynchronously (see our recommended anti-flicker techniques)
Server SDKs
Where they run: On your backend infrastructure Best for: Backend logic, API responses, or when you need to keep targeting rules private Trade-offs:- Keeps feature logic and rules private
- No visual flicker
- Requires infrastructure to run (not just a script tag)
- Need to pass evaluation results to the frontend if UI changes are required
- May need to extract attributes from cookies, headers, or tokens
Edge SDKs
Where they run: On edge platforms/CDNs (Cloudflare Workers, Fastly Compute, Lambda@Edge) Best for: Eliminating flicker for visual experiments or doing redirects before your application server handles the request Trade-offs:- Eliminates flicker for visual experiments and redirects
- Can inject feature data into HTML for the frontend to use
- More complex setup and integration
- Resource constraints (CPU/memory limits)
Getting Started
Choose your SDK below to see installation and setup instructions:Client
HTML Script Tag
Drop-in script for any website or low-code platform
Javascript
Vanilla JS and TypeScript projects
React
React hooks and providers with SSR support
Next.js
App/Pages router examples (with support for SSR)
Vue
Vue 3 with composables and Nuxt support
Kotlin (Android)
Native Android development
Flutter
Cross-platform mobile apps
Swift (iOS)
Native iOS development
React Native
Cross-platform React Native apps
Server
Node.js
Express, Fastify, and Node.js servers
PHP
Laravel, Symfony, and PHP applications
Ruby
Rails and Ruby applications
Python
Flask, Django, FastAPI, and async support
Java
Spring Boot and Java applications
C#
.NET Core and ASP.NET applications
Go
High-performance Go services
Elixir
Phoenix and Elixir applications
Rust
Actix, Axum, Rocket, and more
Vercel
Vercel Flags SDK with Edge Config
Edge
Cloudflare Workers
Low-latency edge computing on Cloudflare’s network
Fastly Compute
WebAssembly-powered edge computing
Lambda@Edge
AWS Lambda at CloudFront edge locations
🛠️ Want to build your own SDK?
Follow our guide to integrate GrowthBook into any platform.

