JavaScript Snippet

The easiest way to get started is to add the Statsig JS script to your website, which takes only a few seconds.

Paste the below code into the <head> section of your website, replacing “YOUR_CLIENT_KEY” with a Client API Key from your Statsig project, which you can find at console.statsig.com/api_keys. This will start recording events & session replays, and give you access to experiments & feature flags right away.

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

Quickstart Installation

Statsig supports >30 SDKs and Frameworks - select the one you’d like below, and if you don’t see the one you want - let us know in Slack.

Client SDKs

Server Side SDKs

Integrations