Skip to content

docs: add Experimentation guides#7993

Merged
Zaimwa9 merged 7 commits into
mainfrom
docs/experimentation-guides
Jul 15, 2026
Merged

docs: add Experimentation guides#7993
Zaimwa9 merged 7 commits into
mainfrom
docs/experimentation-guides

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Documents the Experimentation feature end to end, as a new top-level sidebar category on docs.flagsmith.com:

  • Experimentation (Beta) category covering the full lifecycle: Connect a Warehouse, Create Metrics,
    Create an Experiment, Run an Experiment (JavaScript and Python instrumentation), and Analyse an Experiment.
  • Statistics Glossary: the existing Experiment Statistics page, moved into the category and renamed.
  • Example: PayPal Button: an end-to-end walkthrough of a real experiment, modernised from the old
    A/B testing tutorial (branches on variation names via useExperiment).
  • UI screenshots for the warehouse tab, the create wizard, and the results page.

How did you test this code?

  • npm run build in docs/ passes with no broken links in the new pages.
  • All pages, images, cross-links and the sidebar order verified on the local dev server.
  • Prettier clean (make lint).

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner July 13, 2026 09:36
@Zaimwa9
Zaimwa9 requested review from Holmus and removed request for a team July 13, 2026 09:36
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 14, 2026 3:39pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Preview Jul 14, 2026 3:39pm
flagsmith-frontend-staging Ignored Ignored Preview Jul 14, 2026 3:39pm

Request Review

@github-actions github-actions Bot added the docs Documentation updates label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an Experimentation documentation section covering warehouse connections, metrics, experiment creation, event instrumentation, PayPal testing, result analysis, and anonymous identity handling. It also creates category navigation, updates the statistics glossary, reformats the existing A/B testing guide, and adds redirects for renamed documentation pages.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 52af566f-521f-4125-bce3-1858e21df39d

📥 Commits

Reviewing files that changed from the base of the PR and between 1c73453 and 6ec2a1c.

⛔ Files ignored due to path filters (5)
  • docs/static/img/experimentation/create-experiment-rollout.png is excluded by !**/*.png
  • docs/static/img/experimentation/create-experiment-setup.png is excluded by !**/*.png
  • docs/static/img/experimentation/experiment-results-analysis.png is excluded by !**/*.png
  • docs/static/img/experimentation/experiment-results-overview.png is excluded by !**/*.png
  • docs/static/img/experimentation/warehouse-tab.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • docs/docs/experimentation-ab-testing.md
  • docs/docs/experimentation/_category_.json
  • docs/docs/experimentation/analyse-an-experiment.md
  • docs/docs/experimentation/connect-a-warehouse.md
  • docs/docs/experimentation/create-an-experiment.md
  • docs/docs/experimentation/create-metrics.md
  • docs/docs/experimentation/example-paypal-button.md
  • docs/docs/experimentation/index.md
  • docs/docs/experimentation/run-an-experiment.mdx
  • docs/docs/experimentation/statistics.md
  • docs/vercel.json

Comment thread docs/docs/experimentation-ab-testing.md
Comment thread docs/docs/experimentation-ab-testing.md
Comment thread docs/docs/experimentation/analyse-an-experiment.md Outdated
Comment thread docs/docs/experimentation/create-an-experiment.md
Comment thread docs/docs/experimentation/create-an-experiment.md Outdated
Comment thread docs/docs/experimentation/example-paypal-button.md Outdated
Comment thread docs/docs/experimentation/connect-a-warehouse.md
Comment thread docs/docs/experimentation/create-an-experiment.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/docs/experimentation/connect-a-warehouse.md (1)

26-30: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify the transition between Created and Pending Connection.
Created is defined as “the connection exists but no events have been received yet”, which overlaps with Pending Connection being “waiting for the first event to arrive”. Give each status a distinct trigger so the flow is unambiguous.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 84c1557e-8ebd-4bc8-a343-d0ada7aa2857

📥 Commits

Reviewing files that changed from the base of the PR and between cc10ffe and f29e156.

📒 Files selected for processing (4)
  • docs/docs/experimentation/analyse-an-experiment.md
  • docs/docs/experimentation/connect-a-warehouse.md
  • docs/docs/experimentation/create-an-experiment.md
  • docs/docs/experimentation/example-paypal-button.md
💤 Files with no reviewable changes (1)
  • docs/docs/experimentation/analyse-an-experiment.md

@Zaimwa9
Zaimwa9 merged commit 1c7121d into main Jul 15, 2026
13 checks passed
@Zaimwa9
Zaimwa9 deleted the docs/experimentation-guides branch July 15, 2026 07:45

@Holmus Holmus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly small comments, looks great overall. The order of doing things and structure makes a lot of sense

@@ -4,76 +4,111 @@ sidebar_label: Experimentation (A/B Testing)
sidebar_position: 4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layout is a bit odd from the top-level.
We have Experimentation (A/B Testing) and Experimentation (Beta).

Not sure what a good solution is but maybe we rename this Experimentation (external) or Experimentation (integration). Alternatively, we can bring it all into a shared category called Experimentation and then put the (A/B testing) one as a page in that category.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a bit conflicting and outdated the previous one. I'll rename it "A/B Testing with integrations" to dissociate from experimentation entirely

Combining these two concepts allows you to deliver seamless A/B test.

We have [integrations](/third-party-integrations/analytics/segment) with a number of analytics platforms. If we don't
integrate with the platform you are using, you can still manually send the test data to the downstream platform

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
integrate with the platform you are using, you can still manually send the test data to the downstream platform
integrate with the platform you are using, you can still send test data to the downstream platform

[multivariate flag](/managing-flags/core-management), collect events from your application into a managed data
warehouse, and read the results with a built-in Bayesian statistics engine.

Experiments are scoped to an **environment**: the warehouse connection, metrics and experiments all live at the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: Should we link to the data model(?)

## Set up and run an experiment

1. **[Connect a warehouse](/experimentation/connect-a-warehouse)**: enable the managed Flagsmith warehouse for your
environment. Done once, in a few clicks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
environment. Done once, in a few clicks.
environment.


Prefer to see it end to end? Follow the [PayPal button example](/experimentation/example-paypal-button).

Unfamiliar with a term? The [Statistics Glossary](/experimentation/statistics) explains every concept in plain language.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Unfamiliar with a term? The [Statistics Glossary](/experimentation/statistics) explains every concept in plain language.
Unfamiliar with a term? See the [Statistics Glossary](/experimentation/statistics).


:::

A running experiment can be **ended** at any time. Its results are frozen as final, and this cannot be undone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "and this cannot be undone" mean?

You can not delete the experiment and the results afterwards?


## Instrument your application

Event collection is currently available in the **JavaScript** and **Python** SDKs, with more to follow. Enable it with

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this information should be on the first page as well (Experimentation (Beta)). It would be slightly annoying to go through the steps to find out that your SDK is not supported.


`trackEvent` / `track_event` sends a named event, optionally with a numeric `value`, traits and metadata.

Any event whose name matches a metric's event name feeds that metric. Conversions are attributed post-exposure: an

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case sensitive?

Error handling / expected response?

While a variation has fewer than 50 identities (or fewer than 5 conversions, for occurrence metrics), it shows
**Collecting data**. Keep the experiment running.

If a **sample ratio mismatch** warning appears, traffic didn't split the way you configured. Don't act on the results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elevate to :::warning::: ?

:::

Flagsmith's statistics engine answers three questions about an experiment: **Am I winning?** (is the variant better than
control), **by how much?** (the lift), and **can I trust it?** (is the difference real, and was traffic split fairly).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this read nicer as a bulleted list maybe

  • am i winning
  • by how much
  • can i trust it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants