Optimizely will be sunsetting Full Stack Experimentation on July 29, 2024. See the recommended Feature Experimentation migration timeline and documentation.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySumbit a ticketLog In
GitHubNuGetDev CommunitySumbit a ticket

Use feature flags

A feature rollout enables you to safely deliver a new feature to your users by controlling who sees it and when. For more information about what a rollout is, see Introduction to rollouts.

Roll out a feature flag

📘

Note

To roll out a feature in Targeted Rollouts projects (default in accounts created after July 2020), ensure you are using the following compatible SDK versions:

  • Swift: v3.3.2 and higher.
  • Agent: v1.1.0 and higher.
  • Go: v1.2.0 and higher.
  • React: v1.0 and higher.
  • All other SDKs: v2.0.0 and higher.

To roll out a feature:

  1. (Prerequisite). Create and implement a feature flag for the functionality you intend to roll out. See Create feature flags.
  2. Under Rules, select an environment from the dropdown.
  3. Set up rules for your rollout. Rules evaluate in the order in which you drag and drop them, using the OR operator. To set up rules:
    • Search and add audiences for the feature. Otherwise, by default, your feature rolls out to a random subset of all your users.
    • For each audience or audience combination, adjust the traffic allocation.
    • For each audience or audience combination, specify different configures for the feature variables.
  4. Click Save. If you enable a rollout for a non-zero traffic percentage, clicking Save launches the rollout.
  5. For each environment, you can set different rules. Repeat the previous steps for other environments you want to configure.
1304

Implement the rollout

Optimizely uses the Is Feature Enabled call you created when you implemented the feature flag to determine if a user qualifies for the rollout or not. For more information, see Create feature flags.

Rollouts are used for launching features, so no impressions are sent and no extra network traffic is generated. To measure the impact of a feature and track metrics on your Results page, create a feature test instead of a rollout.

📘

Note

Feature rollouts and feature tests operate on the same feature flags, but they have important differences. Before using a rollout or a test, be sure to read Interactions between feature tests and rollouts.

Manage feature rollouts

The Features dashboard gives you a snapshot of what is happening to a feature at a given point in time:

  • Active Experiments: lists all active (running or paused) feature tests for each feature.
  • Environment: lists the available production and staging environments.
1078

Features overview

Once you have removed a feature flag from your code, you can archive it by clicking the Action icon () and selecting Archive.

1110

Archive a feature