On this page

For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.

New Experiment Run

Create a new run of an existing experiment after you fix instrumentation issues that affected data quality. A new run excludes previous user data from your experiment's monitoring and analysis.

Create a new run

To create a new run of an existing experiment:

  1. Open a running or completed experiment.
  2. Open the menu next to Turn off flag (for completed experiments) or Complete experiment (for running experiments) and select New run.
  3. Select a new analysis range. Optionally, configure how Amplitude handles users in the new run and what happens to existing feature flags.

Configuration changes on a new run

Amplitude applies the following changes to your experiment configuration when you create a new run:

Experiment key

When you create a new run, Amplitude adds the new run's experiment key to the default Amplitude Exposure event as a filter on [Experiment] Experiment Key. The filter excludes users who still receive the previous run from an SDK, so their exposures don't count toward the new run.

If you clear Include the experiment key under the exposure event control, later new runs keep the setting off. Amplitude doesn't add the experiment key again.

Assignment events and custom exposure events don't carry the experiment key. Amplitude keeps these events as you configured them, and separates runs by time only, using the new run's start date.

Requirements for the experiment key

The experiment key filter only counts exposure events that include the [Experiment] Experiment Key property. To send this property:

  1. Your experiment must use Amplitude's default exposure tracking.
  2. Your client SDK version must support experiment restarts.

Zero exposures in the new run

If your exposure events don't include the experiment key, the new run shows zero exposures. This happens with SDK versions older than the ones in the table, or with a custom exposure tracking provider that doesn't forward experiment_key. To fix it, clear Include the experiment key under the exposure event control.

If you use the Evaluation API, the response body contains the experiment key of the actively running experiment.

json
{
    "<flag_key>": {
        "key": "<variant_value>",
        "payload": <variant_payload>,
        "experiment_key": "exp-1",
    },
    // ...
}

The experiment key is also available when you fetch variants with Experiment SDKs. For example, the JavaScript SDK Variant object contains the existing value and payload properties along with a new expKey property.

Was this helpful?