Back to guides
Tutorials

A/B Testing with Statsig on Flint Pages

Statsig is a modern experimentation platform with a generous free tier, a no-code web editor, built-in session replay, and product analytics. This guide walks you through the full setup on your Flint site.

Overview

Statsig combines feature flags, A/B testing, session replay, and product analytics in one platform. It is used by companies like OpenAI, Notion, and Brex, and is known for having transparent, affordable pricing with a free tier that covers 2 million events per month.

With Statsig connected to your Flint site, you can:

  • Run A/B and multivariate experiments with Bayesian or frequentist statistics
  • Use the no-code web editor to create visual test variants without writing code
  • Watch session replays to understand how visitors interact with your landing pages
  • Track funnels and conversion paths with built-in product analytics
  • Use feature flags to gradually roll out page changes and measure impact

Statsig is a strong fit for technical and semi-technical teams that want both experimentation and analytics in one tool.

What you need

  • A Flint account (sign up here)
  • A Statsig account (statsig.com) - free to start, no credit card required
  • Your Statsig Client API Key, found in your Statsig console under Settings > Keys & Environments

Step 1: Add the Statsig script to your Flint site

Statsig provides a JavaScript snippet for client-side experimentation. To install it on all your Flint pages:

  1. 1.In your Statsig console, go to Settings > Keys & Environments and copy your Client API Key.
  2. 2.In your Flint editor, click the Settings button in the top navigation, then go to Site Settings > Custom Code.
  3. 3.Paste the following snippet into the Head field, replacing YOUR_CLIENT_KEY with your actual key:
html
<script src="https://cdn.jsdelivr.net/npm/@statsig/js-client/build/statsig-js-client+session-replay+web-analytics.min.js"></script>
<script>
  var client = new statsig.StatsigClient('YOUR_CLIENT_KEY', { userID: 'anonymous' });
  client.initializeAsync().then(function() {
    window.statsigClient = client;
  });
</script>
  1. 4.Click Save. Statsig is now active on all your Flint pages.

Note: The snippet above uses Statsig's current JS SDK (@statsig/js-client). For more sophisticated user identification (passing user attributes for targeting), see the Statsig JS SDK docs.

Step 2: Create an experiment in Statsig

There are two ways to create experiments in Statsig: using the no-code web editor (for visual changes) or using the SDK directly in code (for programmatic control).

Option A: No-code web editor

  1. 1.In Statsig, go to Experiments and click Create New.
  2. 2.Choose Web Experimentation.
  3. 3.Enter your Flint page URL. Statsig will load a visual editor pointing at your live page.
  4. 4.Use the editor to click on elements and change text, styles, or visibility to create your variation.
  5. 5.Define your metrics - clicks, form submissions, or custom events.
  6. 6.Set your traffic allocation and launch the experiment.

Option B: Programmatic (SDK-based)

For experiments you want to control with code, ask the Flint agent to instrument your page. For example:

text
Create a Statsig A/B experiment for the hero section on /landing-page.

The experiment is called "hero_copy_test" with two variants:
- control: headline reads "Build landing pages in minutes"
- variant_a: headline reads "Your AI-powered page builder"

Statsig is already loaded via script tag. Use window.statsigClient.getExperiment('hero_copy_test')
to read the active variant and apply the correct headline on page load.

The Flint agent will add the experiment logic directly to the page.

Step 3: Define your conversion metrics

Statsig tracks metrics as events. You need to log events when meaningful actions happen on your Flint pages.

Auto-captured events
Statsig automatically captures page views, clicks, and scroll depth without any additional setup once the SDK is installed.

Custom events
For specific conversions like form submissions or CTA button clicks, add custom event tracking. Prompt the Flint agent:

text
When a visitor submits the demo request form on /demo-request, fire a Statsig custom
event called "demo_form_submitted". Statsig is already loaded via script tag.
Use: window.statsigClient.logEvent('demo_form_submitted', null, { page: '/demo-request' });

Once logged, these events appear as selectable metrics when you create or edit an experiment in Statsig.

Step 4 (optional): Full page variant test

For testing two completely different page designs:

  1. 1.In Flint, duplicate your landing page to create a variant (e.g., /landing-page-v2) and make your changes there.
  2. 2.In Statsig, create a new experiment with a redirect action in the no-code web editor, or prompt the Flint agent to add redirect logic based on the Statsig experiment assignment:
text
On /landing-page, check the Statsig experiment "page_design_test" using window.statsigClient.
If the visitor is assigned to the "variant_a" group, redirect them to /landing-page-v2.
Statsig is already initialized on the page via window.statsigClient.

Statsig will track which variant each visitor saw and attribute conversion events accordingly.

Using session replay to understand visitor behavior

Statsig includes built-in session replay (50,000 sessions/month on the free tier). This is especially useful for landing page optimization because you can watch exactly how visitors interact with your page before you decide what to test.

Session replay is included in the recommended SDK snippet in Step 1 (the bundle already contains @statsig/session-replay). To confirm it is active:

  1. 1.In Statsig, go to Session Replay in the left navigation and ensure recording is enabled for your project.
  2. 2.Verify you are using the combined bundle snippet from Step 1 (the one ending in +session-replay+web-analytics.min.js). If you installed a minimal bundle, you may need to switch to the full bundle.
  3. 3.Recordings will appear in your Statsig console under Session Replay within a few minutes of visitors landing on your pages.

Note: Session replay retention is 30 days on the free and Pro tiers.

Reading your results

Statsig supports both Bayesian and Frequentist statistical approaches:

  • Bayesian (default): Shows the probability that each variation is better and the expected lift. You can check results at any time without inflating error rates.
  • Frequentist: Shows p-values and confidence intervals. Set your minimum detectable effect and sample size before starting.

Statsig also supports CUPED (Controlled-experiment Using Pre-Experiment Data), which reduces variance and lets you reach significance faster by accounting for pre-experiment behavior.

Results appear in your Statsig console under the experiment's Results tab. Once a variation shows a statistically significant improvement, apply the winning changes to your Flint page directly and mark the experiment as complete in Statsig.

Statsig pricing

Statsig has transparent, usage-based pricing:

  • Free: 2 million events/month, unlimited feature flag checks, 50,000 session replays/month, 1-year analytics retention. No credit card required.
  • Pro: $150/month - includes 5 million events/month, 100,000 session replays, unlimited analytics retention, and advanced experimentation features.
  • Enterprise: Custom pricing with warehouse-native deployment, SSO, RBAC, and priority support.

For most Flint users testing landing pages, the free tier is sufficient to get started.