To begin, login to your account and on the Features tab, click the New Feature… button.
In the New Feature window, provide the following details:
Feature Key - a unique identifier for the feature. Be sure to use alphanumeric characters, hyphens, and underscores in this unique key. No spaces.
Description - while an optional field, we encourage you to provide a summary of the feature and what is does for ease of identification by the team.
Feature Configuration -Defining feature variables allows you to iterate on your feature without redeploying the code. Planning your variables upfront will help developers avoid hard coding when not ideal.
Controls - This is the toggle that turns the flag on/off in the specified environment. You can toggle a feature off to release code quickly without exposing it to users. You can also roll it out to a fraction of your user base to minimize the impact of the launch, allowing you to validate functionality and measure performance prior to rolling out broadly.
Audiences - the group(s) of users to whom the feature will be made available. You can safely develop the feature directly in Production, hide it behind the feature flag, and set the audience to whoever you want viewing the feature.
Example Code - Copy the appropriate API call with your feature key into your code. Optimizely populates the feature key, in each of the supported languages. The
userIDcan be any non-null string.
Create Feature - this saves the feature flag, making it available for implementation in your code.
Return to this feature whenever you want to update the feature flag and its availability. You can add and remove audiences, toggle the feature on in different environments, roll it out or back, and refer to the example code.