nav_title | article_title | page_order | description | tool | platform | |||
---|---|---|---|---|---|---|---|---|
Feature Flag Experiments |
Feature Flag Experiments |
40 |
Feature flag experiments let you A/B test changes to your applications to optimize conversion rates. |
Feature Flags |
|
Feature flag experiments let you A/B test changes to your applications to optimize conversion rates. Marketers can use feature flags to determine whether a new feature positively or negatively impacts conversion rates, or which set of feature flag properties is most optimal.
Before you can track user data in the experiment, your app needs to record when a user interacts with a feature flag. This is called a feature flag impression. Make sure to log a feature flag impression whenever a user sees or could have seen the feature you're testing, even if they're in the control group.
To learn more about logging feature flag impressions, see Creating feature flags.
const featureFlag = braze.getFeatureFlag("my-new-feature");
braze.logFeatureFlagImpression("my-new-feature");
if (featureFlag?.enabled) {
return <NewFeature />
} else {
return <ExistingFeature />
}
- Go to Messaging > Campaigns and click + Create Campaign.
- Select Feature Flag Experiment.
- Name your campaign something clear and meaningful.
Next, create variations. For each variant, choose the feature flag you want to turn on or off and review the assigned properties.
To test the impact of your feature, use variants to split traffic into two or more groups. Name one group "My control group" and turn its feature flags off.
Though you specified default properties when you originally set up your feature flag, you can choose to overwrite those values for users who receive a specific campaign variant.
![][image1]{: style="max-width:80%"}
To edit, add, or remove additional default properties, edit the feature flag itself from Messaging > Feature Flags.
Next, you need to target users by choosing segments or filters to narrow down your audience. Segment membership is calculated when feature flags are refreshed for a given user.
{% alert note %} Your target audience will be eligible for the feature flag as soon as you save a rollout greater than 0%. Changes are made available once your app refreshes feature flags, or when a new session is started. {% endalert %}
Choose the percentage distribution for your experiment. As a best practice, you should not change the distribution once your experiment has been launched.
Braze lets you to track how often users perform specific actions, conversion events, after receiving a campaign. Specify up to a 30-day window during which a conversion will be counted if the user takes the specified action.
After you’ve finished building the last of your experiment, review its details, then click Launch Experiment.
[image1]: {% image_buster /assets/img/feature_flags/feature_flag_experiment_override.png %}