Editing and archiving experiments
Overview
This topic explains how to edit an experiment and archive it when you are done with it.
Edit experiments
You can make changes to the name, hypothesis, randomization unit, metrics, and audience of an existing experiment. Changing the audience of a running experiment requires you to stop the experiment first, and restart a new iteration after you change the audience.
After you create an experiment, you cannot edit its flag or the flag’s variations. If you want to use a different flag or a different flag variation, you must create a new experiment.
Change experiment settings
You can change an experiment’s name and hypothesis at any time without affecting the results of the experiment.
If you want to begin measuring a completely different randomization unit or metric as part of an experiment, we recommend creating a new experiment instead of editing an existing one. If you want to use a similar metric, you can change the metric associated with an experiment.
To change an experiment’s name, hypothesis, metric, or randomization unit:
- Navigate to the Design tab of your experiment.
- Click Edit design.
- Edit the Name or Hypothesis as needed.
- Choose new Metrics as needed.
- Choose a new randomization unit from the Randomize by menu as needed.
- Scroll to the top of the page and click Save.
- If the experiment was running when you made edits, a “Save experiment design?” dialog appears. Enter a reason for the change and click Save & start new iteration.
Change experiment audiences
To edit the audience of an experiment, you must stop the experiment iteration, make the audience update, and start a new iteration. This lets you select a flag variation to serve to any contexts that will no longer be included in the experiment.
To edit the audience of an experiment:
- Navigate to the Design tab of your experiment.
- Click Stop experiment. The “Stop experiment” dialog appears.
- Select a winning variation to serve while the experiment is stopped.
- Enter a Reason for stopping.
- Click Stop experiment.
- Click Edit design.
- Navigate to the “Audience targeting” section and update the Experiment audience as needed.
- You can also update the Sample size if you need to change the percentage of contexts to serve the experiment to.
- Scroll to the top of the page and click Save.
- Click Start to start a new iteration of the experiment.
Archive experiments
You can archive experiments that have concluded, as well as the flags and metrics attached to them, but you cannot permanently delete experiments. Archiving experiments preserves the results so you can refer to them in the future.
Before you can archive an experiment:
- The experiment must not be running. To learn how to stop an experiment, read Stop experiment iterations.
- The experiment must not be included in a layer. To learn how to remove an experiment from a layer, read Remove experiments from layers.
LaunchDarkly hides archived experiments from the Experiments list. You cannot start new iterations for archived experiments.
To archive an experiment:
- Navigate to the Experiments list in the environment you want to archive an experiment in.
- Click on the name of the experiment you want to archive. The experiment detail page appears.
- Click Archive experiment.
To view archived experiments on the Experiments list, click View and select Archived experiments. To switch back to viewing active experiments, click View and select Active experiments.
To restore an experiment, click Restore experiment from the experiment details page.
When you archive or restore an experiment, LaunchDarkly sends the maintainer and anyone following the experiment an email, an in-app notification, and, if you have the Slack app integration configured, a Slack notification.
Experiment settings are environment-specific
Experiments and experiment settings are specific to single environments. If you want to run the same experiment in different environments, you must create and run the experiment in each environment individually.
You can also use the REST API: Patch experiment