No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Experiment flags

Read time: 3 minutes
Last edited: May 01, 2024

Overview

This topic explains how you can use experiment flags to test a hypothesis. These flags help you validate the impact of features you roll out to your app or infrastructure.

Understanding experiment flags

Experiment flags are temporary flags. In the most common use case, you wrap an experiment flag around code for a new or improved feature that impacts end users. Experiment flags can be either boolean or multivariate, so that the experiment can test multiple values. You can pair flags with metrics to compare context or system behavior between two or more flag variations. To learn more, read Experimentation.

To create an experiment flag:

  1. Navigate to the flags list.
  2. Click Create flag. The "Create new flag" page appears.
  3. Enter a unique, human-readable Name.
  4. (Optional) Update the flag Key. You'll use this key to reference the flag in your code. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
  5. (Optional) Enter a Description of the flag. A brief, human-readable description helps your account members understand what the flag is for.
  6. (Optional) Update the Maintainer for the flag.
  7. (Optional) Check the Include flag in this project's release pipeline box. To learn more, read Release pipelines.
  8. (Optional) Choose any Metrics to monitor in the Metrics section. To learn more, read Metrics.
  9. Choose the Experiment flag template in the Configuration section:
The "Configuration" section of the "Create new flag" page.
The "Configuration" section of the "Create new flag" page.
  1. Choose Yes or No to indicate whether this flag is temporary. Experiment flags are usually temporary.
  2. Select a flag type:
    • Boolean: optionally update the Name of the true and false variations.
    • String: enter a Value for each variation, and optionally update the Name of each variation. To add more variations, click +Add variation.
    • Number: enter a Value for each variation, and optionally update the Name of each variation. To add more variations, click +Add variation.
    • JSON: enter a Value for each variation, and optionally update the Name of each variation. To add more variations, click +Add variation.
  3. (Optional) In the "Variations" section, create variations for each experiment treatment.
  4. (Optional) Update the default variations.
  5. Choose one or more tags from the Tags menu.
  6. Check the SDKs using Mobile Key and/or SDKs using client-side ID boxes to indicate which client-side SDKs you will use to evaluate this flag. If you are using a server-side SDK, leave these boxes unchecked.
  7. Click Create flag.

The new flag appears in the flags list.

To learn more, read Creating new flags.

Then, run experiments on the flag. To get started, click Add experiment the flag's right sidebar. To learn more, read Creating experiments.