Feature Flags for Web
Use feature flags to control the availability of content or functionality on your website, without deploying new code.
Our initial release of feature flags was for mobile apps. Today’s release adds support for websites.
The format of a feature flag is a conditional if statement you add to your website code. It contains your flag name and wraps around the website code you want the flag to control.
After adding the flag to your website, you can manage the feature’s audience and schedule from the Airship dashboard. If something unexpected happens with the feature, or if you have reason to end access before its scheduled end time, you can turn it off for all users instantly, without having to update your website code.
Use feature flags for:
- Premium features — Provide premium feature access only to paid users based on membership tiers.
- Phased releases — Release features to segments of your audience over time to prevent a strain on resources, such as database queries, support tickets, or limited initial product supply.
- Time-limited promotions — Turn on and off features that are meant to be time-restricted, manually or using an automated schedule, such as displaying a promotional banner only during a sale weekend.
- Testing — Test features with a small segment of your audience before releasing the feature to the rest of your audience.
Workflow
The following is the general workflow for using feature flags.
Create a flag in the dashboard, defining:
A display name and description for the dashboard
A flag name for reference in your website code
Audience — When creating a flag, you can set your audience to members of a Test GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview.. When you are ready to go live, set a percentage of your total audience that will be able to view the feature determined by the flag. You can also set conditions audience members must meet in order to experience the feature the flag controls.
Scheduling — You can create open-ended or time-bound flags, starting immediately or at a scheduled time and date.
In the Review step when creating the flag, copy the code snippets and docs link, then give them to your developer.
Add the flag to your website. This step is usually performed by a developer.
After you update your website with the flag code, the feature will be available to the configured audience the next time they visit the site, according to the flag’s schedule. Manage the flag from the Airship dashboard.
Requirements and documentation
Feature Flags are available for Airship customers participating in our special access program. Sign up here GA release: April 30, 2024.
Get all the details in the user guide.
Categories