Controlling experiment populations
Read time: 2 minutes
Last edited: Apr 02, 2021
This topic explains what an experiment population is, and how to use LaunchDarkly's features to show experiments only to a specific group of users.
You can get accurate results more quickly if you only expose some of your user base to experiments. You have the option to only include a subset of users in your experiments. This subset of users is referred to as your experiment population.
You can create a custom experiment population by selecting specific flag targeting rules to include in your active experiments.
For example, imagine you are testing alternate copy for your checkout button. You're currently targeting all your Canadian and US users with the 'true' variation for the alternate button, which shows your new copy, but you only want to run an experiment measuring click conversions for users in the United States. To accomplish this, you select the user targeting rule that affects US-based users and de-select the rule that targets users in Canada.
You may want to refine your experiment population for any of the following reasons:
- Running targeted experiments for a subset of your flag-targeted users.
- Excluding user groups whose events you do not need to measure. For example, users affected by 'Default' rules.
- Reducing the events volume an experiment generates in order to manage billing costs.
If you can't see the feature described below, your SDKs may be out of date. To solve this problem:
Update your SDKs to the latest version.
Contact email@example.com to enable the feature.
You can refine your user base into a specific experiment population by following the procedure below.
You can also configure which user data LaunchDarkly sends to Data Export destinations in this menu. Customizing which data LaunchDarkly exports.
To customize your experiment population:
- Identify which flag is associated with the experiment you wish to modify.
- Navigate to that flag's Settings tab.
- Click N of N targeting rules in the "Exporting events from" line. The "Configure event settings" screen opens.
- Click the Custom selection radio box to modify the users who can see an experiment. When you click Custom selection, you can choose which targeting rules you wish to include or exclude from an experiment.
- Select the checkboxes of rules you wish to include in the experiment. This refines the experiment's population down to the group you choose.
- Click Save Changes. A confirmation dialog appears.
- Type the name or key of the environment in the text box and click Confirm.
The modified list of users you created is now the experiment's population.
You can customize your experiment's population at will without your flag targeting rules changing. Flag targeting controls which variation of a flag a user sees. An experiment's population determines which of your users contribute to Experimentation results or Data Export streams. To learn more, read Targeting users.