No results for ""
  • Home
  • API docs


Creating funnel optimization experiments

Read time: 5 minutes
Last edited: Jun 05, 2024


This topic explains how to set up and configure a funnel optimization experiment in LaunchDarkly.

Configuring experiments

Configuring a funnel optimization experiment requires five steps:

  1. Creating metrics for your funnel,
  2. Creating a funnel group,
  3. Building an experiment,
  4. Turning on the feature flag, and
  5. Starting an iteration.

These steps are explained in detail below.

Create metrics

Metrics measure audience behaviors affected by the flags in your experiments. Custom conversion/binary metrics and click metrics are most often used with funnel optimization experiments. To learn more, read Choose a metric type.

Funnel experiments can only use metrics that use the "mean" analysis method. To learn more, read Analysis method.

If you want to learn which flag variation performs better, it must be possible for that metric to measure something in all of the flag variations within the experiment. To learn more, read Metrics and flag variations.

Create funnel metric groups

A metric group is a reusable, ordered list of metrics you can use to standardize metrics across multiple experiments. You must create a funnel metric group before you build a funnel optimization experiment. To learn how, read Metric groups.

To create a useful funnel metric group, each metric within the group should represent a mandatory step in the customer journey. Customers should not be able to skip steps in the funnel, or complete steps out of order. If they can, you should instead create a standard metric group to use with a feature change experiment. Or, if you have other metrics you want to measure in addition to an ordered funnel with required steps, you can add them as secondary metrics.

Build experiments

You can view all of the experiments in your environment on the Experiments list.

Before you build an experiment for the first time, you should read about and understand randomization units, primary and secondary metrics, and attribute filters.

To build an experiment:

  1. Navigate to the Experiments list.
  2. Click Create experiment.
  3. The "Experiment details" step opens. Enter a Name.
  4. Enter a Hypothesis.
  5. Select the Funnel optimization experiment type.
  6. Click Next. The "Choose randomization unit and attributes" step opens.
  7. Choose a context kind from the Randomization unit menu.
  8. (Optional) Choose up to five context attributes to slice results by.
  9. Click Next. The "Select metrics" step opens.
  10. Choose a funnel group, or click Create funnel group to create and use a new funnel group.
    • A list of environments displays showing which environments have received events for these metrics. If no environments are receiving events, check that your SDKs are configured correctly.
The "Select metrics" step of a new experiment.
The "Select metrics" step of a new experiment.
  1. (Optional) Choose additional metrics or metric groups from the Secondary metrics menu.
  2. Click Next. The "Choose flag variations" step opens.
  3. Choose a Flag to use in the experiment, or click Create flag to create and use a new flag.
  4. Click Next. The "Set audience" step opens.
  5. Choose which targeting rule to run the experiment on.
  • If you want to restrict your experiment audience to only contexts with certain attributes, create a targeting rule on the flag you include in the experiment and run the experiment on that rule.
  • If you don't want to restrict the audience for your experiment, run the experiment on the flag's default rule. If the flag doesn't have any targeting rules, the flag's default rule will be the only option.
The "Set audience" step with the default rule chosen.
The "Set audience" step with the default rule chosen.
  1. Enter the percentage of traffic for each variation you want to include in the experiment. You must include at least two variations for the experiment to be valid.
  2. Select which variation you want LaunchDarkly to serve to the remaining population.
  • (Optional) Advanced: We strongly recommend leaving the Advanced options on their default settings. To learn more, read About carryover bias.
The "Set audience" section of a new experiment.
The "Set audience" section of a new experiment.
  1. Click Finish. You are returned to the experiment's Design tab.

You can also use the REST API: Create experiment

After you have created your experiment, the next steps are to toggle on the flag and start an iteration.

Turn on feature flags

For an experiment to begin recording data, the flag used in the experiment must be on. To learn how, read Turning flags on and off.

You can build multiple experiments on the same flag, but you can run only one of those experiments on the flag at a time.

Start experiment iterations

After you create an experiment and toggle on the flag, you can start an experiment iteration in one or more environments.

To start an experiment iteration:

  1. Navigate to the Experiments list.
  2. Click on the environment section containing the experiment you want to start.
  • If the environment you need isn't visible, click the + next to the list of environment sections. Search for the environment you want, and select it from the list.
The environment selection menu.
The environment selection menu.
  1. Click on the name of the experiment you want to start an iteration for. The Design tab appears.
  2. Click Start.
  3. Repeat steps 1-4 for each environment you want to start an iteration in.
An experiment with the "Start" button called out.
An experiment with the "Start" button called out.

Experiment iterations allow you to record experiments in individual blocks of time. To ensure accurate experiment results, when you make changes that impact an experiment, LaunchDarkly starts a new iteration of the experiment.

To learn more about starting and stopping experiment iterations, read Managing experiments.

You can also use the REST API: Create iteration