Use mutual exclusion
Describes using mutually exclusive groups to ensure that users do not see overlapping experiments that apply to different flags in Optimizely Feature Experimentation.
By default, your experiments in an Optimizely Feature Experimentation project may overlap with one another so that a single user could be exposed to multiple experiments at the same time. Mutually exclusive experiments help you ensure that a single user cannot be exposed to two different experiments running at the same time by ensuring that users are only exposed to one particular experiment.
For example, imagine that you are running two experiments that test the same algorithm. Users who see both experiments could cause interaction effects that taint your experiment results by behaving differently from users who see each experiment in isolation. To clearly understand the impact of each set of changes, make the two experiments mutually exclusive. See Mutually Exclusive experiments for information.
Exclusion groups
In Optimizely Feature Experimentation projects, you can make two or more experiments mutually exclusive of each other using exclusion groups. Using exclusion groups does not require any change in the SDKs. The Decide and Track Events methods automatically evaluate whether an experiment is in a group and assign users to the appropriate experiment and variation.
Create an exclusion group
Note
You should start all the experiments in an exclusion group at the same time. You should not add or remove running experiments in an exclusion group because it may have unintended effects on your results. For more best practices, view the documentation on Best Practices - Mutually Exclusive Experiments.
- With the Feature Experimentation UI – See the Create an exclusion group section in the use mutual exclusion in Feature Experimentation user documentation.
- With the REST API – Use the Create an Exclusion Group endpoint.
Add an experiment to an exclusion group
- With the Feature Experimentation UI – See the Add an experiment to an exclusion group section in the use mutual exclusion in Feature Experimentation user documentation.
- With the REST API
- Get your experiment rule's ID – Use the Fetch the Rule for a Ruleset in an Environment endpoint to retrieve your experiment rule's ID. Find the exclusion group you want to update.
- Update the exclusion group – Add the stringified rule ID to the exclusion group's
rules
object, then use the Update Exclusion Groups endpoint to patch the updated exclusion group.
Remove an experiment from an exclusion group
- With the Feature Experimentation UI – See the Remove an experiment from an exclusion group section in the Use mutual exclusion in Feature Experimentation user documentation.
- With the REST API –
- Get your exclusion groups – Use the List Exclusion Groups endpoint view all exclusion groups in your project.
- Update your exclusion groups – Remove the experiment rule's ID from the
rules
object, then use the Update Exclusion Groups endpoint to patch the updated exclusion group.
Archive and unarchive an exclusion group
Archive
- With the Feature Experimentation UI – See the Archive section in the Use mutual exclusion in Feature Experimentation user documentation.
- With the REST API – Use the Archive an Exclusion Group endpoint.
Unarchive
- With the Feature Experimentation UI – See the Unarchive section in the Use mutual exclusion in Feature Experimentation user documentation.
- With the REST API – Use the Unarchive Exclusion Groups endpoint.
Bucketing
The following table shows how exclusion groups can interact with other bucketing methods. For more detail, see How bucketing works.
Bucketing | Comment |
---|---|
Exclusion groups evaluate before this user bucketing method: |
|
Exclusion groups evaluate after these user bucketing methods: |
|
Important
If there is ever a conflict over how a user should be bucketed, then the first user-bucketing method to be evaluated overrides any conflicting method. For more information, view the End-to-end Bucketing Workflow on How bucketing works.
Updated 8 days ago