Feature Flags
A Feature Flag is a toggle for controlling the availability of content or functionality in your app or website. Flag properties enable making immediate app or website code updates. ADD-ON iOS SDK 17.1+Android SDK 17.1+
About Feature Flags
The format of a Feature Flag is a conditional if statement you add to your app or website. It contains your flag name and any properties and wraps around the code you want the flag to control. Airship provides the flag as a code snippet for your developer to add to your app or website.
After adding the flag to your app or website, you can manage its audience, schedule, and properties 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 disable it for all users instantly. For apps, this means eliminating the need to release an app update and waiting for users to install the new version.
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.
- Live updates — Make immediate changes to your app or website by updating property values.
Flags can be open-ended or time-bound, starting immediately or at a scheduled time and date. You can also use Feature Flags to determine a messaging audience or trigger automation.
Audience
When creating a flag, 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, select All Users for your entire audience or select Target Specific Users and set conditions, then set a percentage of your set audience that will be able to view the feature determined by the flag. Audience members are randomly selected. Any user included in the set percentage are considered eligible, meaning they have access to the feature.
Setting a percentage helps you limit the audience so you can effectively manage feedback or limit exposure to potential bugs. For feature rollout, gradually increase the percentage to expand your audience. For example, you could set a condition where only users who have freshly installed your app will be able to access the flagged feature. If set a percentage of 10%, only 10% of users who meet the condition will be able to access the feature.
For more about audience and eligibility, see Example use case below.
Supported channels per condition:
Condition | Supported Channels |
---|---|
App version | App |
Device tags | App, Web |
Locale | App, Web |
Location opt-in status | App, Web |
New users | App, Web |
Platforms | App, Web |
Push opt-in status | App, Web |
Segments | App iOS SDK 17.6+Android SDK 17.5+ |
Properties
You can add properties that can be used by your app’s or website’s code within a Feature Flag, bypassing the need for traditional code changes and release processes. The flag code you pass on to your development team includes references to the properties. Once implemented, edit the properties in the dashboard to make immediate changes to your app or website, like variables that can be updated remotely. As a general example, you could create properties for a promotion’s title, description, and button URL, then change their values when the promotion ends and a new one launches.
When creating or editing a flag, set a name, type, and value for each property. Properties can be a string, number, boolean, or JSON. You can create up to 50 properties per flag.
Properties use cases:
Coffee mobile ordering app — Create a flag with properties for controlling the promotions and rewards for loyalty membership. Using just the Airship dashboard, you can transition from pumpkin spice promotions to holiday themes in sync with seasonal campaigns. Celebrate special limited time milestones, such as the app’s 10th anniversary, by offering “10x rewards” points.
Music streaming app — Create a flag with properties to introduce a new premium subscription tier. Launch the feature to 25% of the audience, with flag properties “Price Point” and “Trial Period Duration” and quickly gauge engagement data and user feedback as users respond to the new tier. Update the properties to fine tune the subscription offer, and roll out the feature to 100% of users once you land on the right details. You can also use a “Promotional Messaging” property to periodically update the copy promoting the new subscription.
Interaction events
Track interaction with the flagged feature by generating an event from the mobile SDK. It must be explicitly called by the developer. See Tracking Interaction in our Mobile platform documentation.
While it is called an “interaction” event, what you track is up to you and depends on the feature. Some examples of how to implement different use cases:
Tracking when a user encounters a change — For a flag that changes a button’s color from blue to green or adds a new button to a screen, track when a user visits the screen containing the button, since it is a visible change.
Tracking when a user interacts with a change — For a flag that changes a button’s destination, track when the user selects the button, since it is a non-visible change.
The events have a flag ID and flag name, which identify which flagged feature a user interacted with. They also have a boolean eligible
field, which indicates whether or not the user was in the Feature Flag audience and had access to the feature. See also Feature Flag Interaction Event in the Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. API reference.
Deciding what you are tracking is especially important when using the flag to trigger a message, since you can trigger based on whether or not the user is part of the Feature Flag audience.
Workflow
The following is the general workflow for using Feature Flags:
Create a flag in the dashboard, setting 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..
In the Review step, copy the code snippets and Mobile docs link. Code is provided for Android (Kotlin and Java), iOS, Cordova, Flutter, and React Native. You can also access the code after saving.
Give the code snippets and Mobile docs link to your developer for implementation.
Add the flag to your app or website This step is usually performed by a developer.
After you update your website with the feature and flag code, the feature will be available to the configured audience the next time they visit the site, according to the flag’s schedule. For apps, the same is true after users install the version of your app that contains the updated code.
After verifying the feature works as intended with your Test Group, change the audience to All Users or Target Specific Users and set the percentage and conditions. Manage the flag from the Airship dashboard. You can turn it on and off, adjust the audience, update properties, change the schedule, etc.
After the flag has served its purpose, archive it and remove the flag code from your app or website.
Draft flags
You can add flag code to your app or website even while it is in Draft state, and then make it active later. For apps, make it active after delivering your new code to devices in an app update.
Example use case
This example is for introducing a redesigned Settings screen in a mobile app.
To let all new users experience the new Settings screen, set up the audience and interaction event like this:
Flag audience Interaction event 1. Select Target Specific Users.
2. Set the audience percentage to100
.
3. Add the condition New users.Track when users view the Settings screen.
100% of users who have freshly installed your app will be able to see the redesigned Settings screen. They are eligible users. For each interaction event:
When
eligible
has a value oftrue
, that means the screen was viewed by a member of the Feature Flag audience. The user experienced the redesigned Settings screen.When
eligible
has a value offalse
, the screen was viewed by a user that is not in the Feature Flag audience. The user saw the old version of the Settings screen.
However, if you’re concerned about the potential for bugs in the redesigned screen, you would want to limit how many new users could see it. Keep all the settings the same except the percentage, which you would set to 10
. 10% of users who have freshly installed your app will be able to see the redesigned Settings screen.
Once you determine the feature is ready for a wider audience, edit the flag and increase the audience percentage. Keep adjusting till you reach 100% or the acceptable threshold determined by your planning.
Creating Feature Flags
Go to Experiments, then Feature Flags.
Select Create Feature Flag. After completing each step, select Next to move on.
Configure for the flag:
Field or Section Description Configuration Display name Dashboard label for the flag. Enter text. Flag name The name used for reference by the SDK. Must be unique. Automatically generated based on the display name, but you can change it. The name can contain letters, numbers, and underscores only, and it must start with a letter and end with a letter or number. You cannot change the flag name after making the flag active. Enter text. Description Optional. Describes what the flag controls. Enter text. Reference image Optional. A screenshot that shows how the feature will appear to your audience. You can access the image later by opening the flag for editing. This option appears for Airship plans with CDN support. Upload an image file. Properties Optional. String, number, boolean, or JSON properties that can be used by your app or website code within the Feature Flag. 50 properties maximum. Select Add property, and then enter a name, select a type, and enter a value. Select Add another for additional properties. Select and configure the audience:
Option Description Configuration All Users Makes the feature available to random users for a percentage of your total app or web audience. Set a percentage. Test Users Makes the feature available to users in a Test Group. Select a test group. Target Specific Users Makes the feature available to random users for a percentage of your app or website that meet specified conditions. The percentage applies to the group of users who meet the conditions. Set a percentage. For conditions, configure according to the steps in Target Specific Users: In-App Experiences. See Audience above for the list of conditions. Schedule the period when the flag will be active. For specific times and dates, also specify the time zone. The UTC conversion displays below the settings and updates as you make changes.
Review your flag settings and copy the code snippets for your developer. Select Create and launch to make the flag active or Exit to save it as a draft. See the status information in Managing Feature Flags.
Implementing the code
For information about accessing flags in the app SDKs, tracking interaction, and error handling, see Feature Flags in our Mobile platform documentation. For Web implementation, contact Support .
For information about accessing flags in the SDKs, tracking interaction, and error handling, see our platform documentation:
You can return to the dashboard to get the code snippets at any time:
- Go to Experiments, then Feature Flags.
- Select the pencil icon () for a flag. It will open to the Review step.
- Copy the code snippets.
- Select Exit.
Using Feature Flags with messaging
You can use a flag’s audience as the audience for an In-App AutomationMessages cached on users’ devices and displayed when users meet certain conditions within your app, such as viewing a particular screen or opening the app a certain number of times. or SceneA single or multi-screen in-app experience cached on users’ devices and displayed when users meet certain conditions in your app or website, such as viewing a particular screen or when a Custom Event occurs. They can be presented in fullscreen, modal, or embedded format using the default swipe/click mode or as a Story. Scenes can also contain survey questions.. See the Audience step in each Create guide:
You can also trigger an In-App Automation, Scene, or SequenceA series of messages that is initiated by a trigger. Airship sends messages in the series based on your timing settings, and you can also set conditions that determine its audience and continuation. Sequences can be connected to each other and to other messaging components to create continuous user experiences in a Journey. when an interaction event occurs. See the Feature Flag Interaction Event trigger in each Triggers guide:
Example campaign strategy
For feature rollout in an app, your developer would implement tracking when users view the screen containing the new feature. Your campaign strategy could look like this:
Inform users of the new feature — Create an In-App Automation or Scene with these settings:
- Audience: Select Feature Flag Audience and select your flag.
- Content: Tell your users about the feature, explain its benefits, and encourage use.
- Behavior: Select the App Update trigger, specify the version of your app that contains the feature and flag code, and enter the number of times users must open your app before they will see your message.
The feature will be available to the Feature Flag audience after they install the version of your app that contains the feature and flag code and according to the flag’s schedule. The message will display for the user after the number app opens you specified when setting up the trigger.
Trigger a survey — Create a Scene that requests feedback from Feature Flag Audience members who have seen or interacted with the flagged feature:
- Audience: Select Feature Flag Audience and select your flag.
- Content: Add questions or an NPS survey about their experience with the feature.
- Trigger: Select the Feature Flag Interaction Event trigger (the flag you selected in the Audience step will be preselected for the trigger), select the user group Users with feature access, then enter the number of times the event must occur before the Scene is triggered.
The Scene will display for members of the Feature Flag Audience after the number of event occurrences you specified when setting up the trigger.
Maximize adoption by designing a JourneyA continuous user experience of connected Sequences, Scenes, Surveys, and/or In-App Automations. that combines the above with a SequenceA series of messages that is initiated by a trigger. Airship sends messages in the series based on your timing settings, and you can also set conditions that determine its audience and continuation. Sequences can be connected to each other and to other messaging components to create continuous user experiences in a Journey. that follows a user’s interaction with the flagged feature and sends a customized message for each key step along the way.
Managing Feature Flags
To view a list of your flags, go to Experiments, then Feature Flags. The default sort order is by last modified, and each row displays:
- Display and flag names
- Start and end dates and times in UTC
- Audience — “Test group” or percentage
- Status — Active, Scheduled, Draft, or Ended
Flag management options are available by selecting an icon in a flag row. Select the three dots icon () for more. Options:
Option | Description | Configuration |
---|---|---|
Edit audience allocation | Opens the audience allocation setting for the flag. You also have the option to end the flag. See the description for End/Cancel flag in this table. | Select the settings icon, set a new percentage, then select Save. To end the flag, select the settings icon, then select End flag. |
Edit flag | Opens the flag for editing. You can change a flag's display name, description, properties, audience, or schedule settings. You can also change the flag name if the flag is not yet Active. You cannot edit archived flags. | Select the pencil icon (), make your changes, then select Update flag in the Review step. |
Duplicate flag | Creates a copy of the flag. The display and flag names are appended with "copy". | Select the duplicate icon (), and then configure as you would a new flag. |
End/Cancel flag | Immediately ends an Active flags or cancels a Scheduled flag. To make it Active or Scheduled again later, you can edit the flag and set a new end date. | Select the pencil icon (), then End flag. |
Archive flag | Hides a Draft or Ended flag from your list of flags. | Select the archive icon (). |
Restore/Unarchive flag | Restores an archived flag to your list of flags. | Select the Archived filter, then select the archive icon () for a flag. |
Additional options for flags used as the audience for an In-App Automation or Scene:
Option | Description | Configuration |
---|---|---|
View related messages | Messages are listed by name, type, and status. You can also open them to check for conflicts between the flag and message schedules. | Select the link icon () to view the list, then select a message name. The message opens to its composer's Review step. See Zeitplan and compare the start and end settings. |
Cancel related messages | Canceling a message is effectively the same as setting an end date for the current date and time. Messages are listed by name, type, and status. You can only cancel Active messages. See also Restart an In-App Automation, Scene, or Survey in Change message status. | Select the archive icon (), then select Stop for an Active message or Stop all for all Active messages. |
Viewing reports
Flag usage data is available in the dashboard. See Viewing Feature Flag and Scene Rollout usage.
Accounts with Performance AnalyticsA customizable marketing intelligence tool that provides access to reports and graphs based on engagement data. can view reports and download a list of users who have interacted with the flag:
- Go to Experiments, then Feature Flags.
- Select the report icon () for a flag, then view reports:
Bericht Description Download steps Feature Flag interactions Counts of users in the Feature Flag audience with at least one interaction event and interaction events per date. The default view is the last 30 days. Use the date selector to define a different time period. Select the down arrow icon, select CSV or TEXT format, and then select Download. Users in flag audience with interaction events A count of users in the Feature Flag audience with at least one interaction event. Users are counted as Channel IDsAn Airship-specific unique identifier used to address a channel instance, e.g., a smartphone, web browser, email address.. Selecting the count lists the platform and Named UserA customer-provided identifier used for mapping multiple devices and channels to a specific individual. for each Channel ID. Select the count to access the list of users. To export the list, select Download. If the count exceeds viewable rows, you can export the full list by selecting Download results to see more.
Contact Airship Sales to add Performance Analytics to your Airship plan.
Kategorien