Skip to main content

Get started with the Statsig SDK

This quickstart will guide you through quickly installing the Statsig SDK in a client app. If you're looking for a more detailed guide, check out the SDK Overview or read about choosing between client or server SDKs.

The easiest way to get up and running is by adding the Statsig JavaScript snippet to your website.

1. Paste the code snippet

In the <head> section of your website, paste the following code snippet.

<script src="https://cdn.jsdelivr.net/npm/@statsig/js-client@3/build/statsig-js-client+session-replay+web-analytics.min.js?apikey=<REPLACE_WITH_YOUR_CLIENT_KEY>"></script>

2. Add client key

Create a client API key in the Statsig console Settings. Copy and paste it to replace <REPLACE_WITH_YOUR_CLIENT_KEY> in the code snippet from the previous step.

3. Next steps

Congratulations! You've set up the Statsig JavaScript snippet. Once installed, you'll be able to: