Setting up Sidecar
- This guide assumes you have an existing Statsig account. Please go here to create a new free account if you don't already have one: https://statsig.com/signup
- You will need to use Google Chrome web browser for this exercise.
Setup Sidecar Chrome Extension
Step 1: Install Chrome Extension
If you don't already have the Sidecar extension, visit the Chrome store and click on the "Add to Chrome" button
Step 2: Activate the extension
Click on the Extensions toolbar button and select "Statsig Sidecar" to activate the Sidecar extension
You will now see an Experiment Config UI like this:
Step 3: Update settings
You will need to update API keys in the Settings Dialog for the extension to work. You can invoke the Settings dialog from the "Settings" link on the top header.
You can retrieve these keys from your Statsig project. In order to get this, login to Statsig Console here: https://console.statsig.com and navigate to the Settings page (https://console.statsig.com/settings)
Once you're there, select the "Keys & Environments" panel and copy both the Console API Key and Client API Key and paste them in the Settings dialog.
Hit "OK" to commit the API Keys.
Install Sidecar on your website
Add a single script tag within the <head>
portion of your website, replacing with your own Client SDK Key as shown below.
<script src="https://cdn.jsdelivr.net/npm/statsig-sidecar/dist/index.min.js?apikey=REPLACE_WITH_YOUR_CLIENT_SDK_KEY"></script>
Installing Sidecar JS via a Tag Manager can potentially lead to flickering and other unpredictable behavior. We strongly encourage installing Sidecar as a synchronous script tag.
Additional Options
Add these query string parameters to the Sidecar script URL for additional controls over Sidecar client behavior
&reduceflicker=0
will disable the brief hiding of the<body>
tag while the client initializes&autocapture=0
will disable event autocapture
Most website builders also support the ability to add script tags on your website. Here are some common website builder examples: Webflow , Wordpress , Wix , Squarespace , Weebly.
You can copy the script code from within the Sidecar Chrome extension