For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/experiments/plan_and_launch_experiments.md. A documentation index is available at /llms.txt.

Plan and Launch Experiments

This product is not supported for your selected Datadog site. ().

Overview

Plan and launch experiments to measure how new features affect business outcomes, user behavior, and application performance.

Prerequisites

You must have the appropriate Product Analytics and Feature Flags permissions to create and launch experiments.

Before you begin, make sure you have:

  • A feature flag for deploying and managing the experiment variants you want to test.
  • At least one experiment metric for measuring the outcome of your experiment.
  • A subject type for setting the level at which Datadog randomizes your experiment.

Plan your experiment

Give your experiment a name and hypothesis, then define the settings.

Draft your experiment

To create a draft experiment:

  1. Navigate to Experiments > Experiment List in Datadog Product Analytics.
  2. Click Create Experiment to open the dialog, then enter your Experiment name and Hypothesis.
  3. Click Create Draft Experiment to open the experiment’s setup page and continue to Set up your experiment.
The Create new draft experiment dialog with an experiment name of New Product Photos Experiment, a hypothesis about higher-resolution product photos increasing add-to-cart conversions, and a Create Draft Experiment button highlighted.

You can also create an experiment directly from a feature flag’s detail page:

  1. Navigate to the Feature Flags page and select the Overview tab.
  2. Select the feature flag you want to use for your experiment to open its detail page.
  3. In the Targeting rules & rollouts section, click Create New Experiment to open the dialog.
  4. In the dialog, click Create Experiment to open the experiment’s setup page.
  5. On the experiment setup page, Datadog pre-fills the Experiment name with the name of the feature flag. Edit it as needed.
  6. Enter your Hypothesis and continue to Set up your experiment.
The feature flag detail page for a flag called new_product_photos, showing targeting rules and rollouts with a 50/50 split between control and treatment variants, and a Create New Experiment button highlighted at the bottom.

Set up your experiment

After creating your experiment, define the metrics, feature flag, and randomization settings.

Set decision metrics

To define the metrics that measure the outcome of your experiment:

  1. Use the Calculate metrics by dropdown to select the subject type.
    • To define a custom subject type, select Create subject type from the dropdown.
  2. Click the Primary metric button to open the picker:
    1. Select a primary metric for the outcome you want to measure.
    2. (Optional) Click the Certified or Non-certified tab to filter the list.
    3. (Optional) Click Create Metric to define a new metric. For setup instructions, see Create Experiment Metrics.
  3. (Optional) Click the Secondary metrics button to add guardrail metrics, which monitor unintended effects of the experiment on other areas such as performance, engagement, or revenue.
  4. Proceed to Run a sample size calculation (optional) or skip to Add a feature flag.
The experiment configuration page showing the Decision metrics section with a Calculate metrics by dropdown set to User (@usr.id), a primary metric set to Add to Cart Conversion, and a Secondary metrics section.

Run a sample size calculation (optional)

The sample size calculator estimates the number of users and the duration needed to detect a meaningful effect. You choose an entry point, the event that assigns users to the experiment, and Datadog uses the volume of traffic to that event to produce the estimate.

To run the calculation:

  1. In the Run a sample size calculation (optional) section, click the sample size calculator link to open the side panel.
  2. Expand Calculation details. Your primary and secondary metrics appear under Metrics.
  3. Use the Entry point dropdown to select the event that assigns users to the experiment, such as viewing a checkout page or clicking an add-to-cart button. Datadog uses this event to estimate traffic volume.
  4. (Optional) Under Filter entry point, narrow the entry point’s audience:
    1. Click + Filter and select a property from the picker. If you do not see the property you need, type the property name in the Custom property field and click Add.
    2. In the filter row that appears, modify the operator as needed and select a value from the dropdown.
    3. (Optional) Click + Filter to add more rows. Between rows, use the dropdown to select or or and to set how filters combine.
  5. Set the Number of variants and Traffic exposure.
  6. Expand Additional inputs, then choose the statistical Power and enter a Target experiment duration in weeks.
    • The Target experiment duration value must be 1 or an even number because the calculator estimates MDE values and expected user counts at 1-, 2-, 4-, 6-, and 8-week intervals.
  7. Click Run Calculation to see an estimate of the Minimum detectable effect (MDE) over time for your metrics.
  8. Close the side panel and continue to Add a feature flag.
The Sample Size Calculator side panel showing calculation details with Add to Cart Conversion as the primary metric and Number of cart views as a secondary metric (guardrail), an entry point set to click on ADD TO CART, two variants at 100% traffic exposure, and additional inputs for power and target experiment duration.

Add a feature flag

To add a feature flag to control how Datadog splits traffic between the experiment variants:

  1. In the Feature flag section, click the Add a feature flag button to open the picker.
  2. Select the feature flag for your experiment.
  3. Continue to Configure randomization.
The feature flag picker showing a list of available flags sorted by creation date, with new_product_photos selected and its details displayed, including the flag key new-product-photos, type Boolean, and a Create New Feature Flag link at the bottom.

Configure randomization

Randomize your users and split traffic across your experiment variants.

After you select a feature flag, Datadog pre-populates the randomization settings based on the flag’s configuration.

The randomization settings you configure here have the following effect after you launch your experiment:

  • Datadog adds a targeting rule to the selected feature flag.
  • If multiple experiments share the same flag, Datadog evaluates traffic based on the order of the flag's targeting rules. You can reorder targeting rules in the confirmation dialog before launching your experiment.

To configure randomization:

  1. Select the Environment for your experiment from the dropdown.
  2. Under Targeting rules, configure a filter to target users based on custom attributes (for example, user role or subscription tier) that you set in your evaluation context:
    1. Click Add Filter. For the IF row, enter an attribute and value, and select an operator from the dropdown.
    2. (Optional) Refine your targeting rule:
      • To add an AND row within the same filter, click Add Condition.
      • To add another filter joined by OR, click Add Filter.
  3. Under Variants, use the Randomize users and split traffic dropdown to choose Equally (recommended) or Custom. This sets how Datadog splits traffic between your variants. Each user sees only their assigned variant throughout the experiment.
    • If you select Custom, enter a percentage for each variant. Percentages must sum to 100%.
  4. Under Traffic exposure, set the percentage of users matching your targeting rules to include in the experiment.
  5. (Optional) Schedule a staged rollout, configure additional settings, or both.
  6. After configuring your experiment, proceed to Launch your experiment.
The Randomization section with the environment set to prod, two targeting rule filters joined by OR (each containing an IF and AND condition with an Add Condition button), an Add Filter button below, a 50/50 equal split between Control (true) and Treatment (false) variants, and traffic exposure set to 100% of targeted traffic with an Add Rollout Steps option.
Schedule a staged rollout

To gradually ramp up experiment traffic instead of launching to all users at once:

  1. In the Randomization section, click Add Rollout Steps and select a preset step configuration from the dropdown (for example, 3 steps from 5% to 100%).
  2. Adjust the Traffic exposure percentage for each step as needed.
  3. Next to Scheduled rollout by holding between steps for, use the two dropdowns to select a number and a time unit (for example, 1 and days). This sets how long each step runs before advancing.

At each rollout step, Datadog samples a percentage of eligible users to include in the experiment. Users outside the sample still see the default (control) experience, but Datadog does not include them in experiment results.

Set notifications

Route notifications to the right people as the experiment progresses.

In the Notifications section, use the Recipients dropdown to select who receives notifications about experiment life cycle events, such as results reaching statistical significance or Datadog detecting an issue.

Choose a statistical analysis plan

Configure how Datadog calculates statistical significance for your experiment.

If your organization has configured default settings, a COMPANY DEFAULT badge appears and Datadog pre-populates the settings.

To modify the statistical analysis plan:

  1. Expand the Statistical analysis plan section.
  2. Select a method from the Confidence interval method dropdown.
    • If you select Bayesian, choose a Standard Deviation of Prior from the dropdown.
  3. Select a percentage from the Confidence level dropdown.
  4. To disable CUPED, toggle off CUPED calculation. CUPED is enabled by default and uses pre-experiment data from each subject to reduce the variance of the metrics and improve experiment sensitivity.
  5. To reduce the risk of false positives, toggle on Multiple testing correction. This setting adjusts for the increased risk across multiple metric comparisons, producing more conservative results.
    • This setting is not available when you use the Bayesian method.
  6. Click Reset to Default to restore the default settings. If your organization has configured a company default, Datadog restores those settings instead.
Add split-by exploration dimensions

Segment your experiment results by properties (also called attributes) from your evaluation context.

To configure split-by dimensions:

  1. Expand the Split-by exploration dimensions section.
  2. Select properties from the Properties to compute for dimensional analysis dropdown. Available properties have the context. prefix.
  3. If you do not see the property you need:
    1. Type the property name in the dropdown field, prefixed with context. (for example, context.team). Then, click Add custom property to open the Split-by exploration dimensions dialog.
    2. Verify the Column Name matches the property name you entered.
    3. Select the property Type from the dropdown.
    4. Click Save. The custom property appears in the Properties to compute for dimensional analysis dropdown.

Launch your experiment

To launch your experiment:

  1. Click Start Experiment to open the Confirm starting the experiment dialog.
  2. In the dialog, review the environment, feature flag, and the flag’s targeting rules for accuracy.
    • If multiple experiments share the same flag, use the up and down arrows on each targeting rule to reorder them.
  3. Click Start Experiment & Enable Flag to launch the experiment.

Launching the experiment opens the Flag & Exposures page. Verify your configuration is live:

  • Review the Exposure balance check to confirm your variants are split at the percentages you configured.
  • Click View Exposures Log to monitor real-time user enrollment.

See Reading Experiment Results to review your data.

Further reading