About tags
Use tags to target audiences, trigger automations, filter message delivery, and localize content.
How tags work
Tags are metadata you attach to a channelA device or address registered with Airship to receive messages, such as a mobile app, web browser, email address, or SMS number. It stores opt-in status, device-specific information, and metadata used for targeting. Each channel has a unique channel ID. or named userA customer-provided identifier used for mapping multiple devices and channels to a specific individual. for audience segmentation. They typically describe a user preference or other categorization, such as wine_enthusiast or weather_alerts_los_angeles.
Airship evaluates tags by presence or absence, not by value. You can set up to 1,000 tags on a single channel or named user, but large tag counts slow audience evaluation.
Tags are organized into tag groups, which categorize related tags such as an interests group for preferences or a loyalty group for membership tiers. Every tag belongs to a tag group, and the same tag name in different groups is treated as distinct.
Set or remove tags directly using the SDK or API, or by uploading a CSV in the dashboard. You can also configure messages to set or remove tags based on user interaction. For example, tags can capture actions such as viewing a product page in your app, submitting a preference form on your website, tapping a promotional link in an email, or replying to a text message with a keyword.
For some use cases, another feature is a better fit:
- When you need values you can compare or filter, such as
lifetime_purchase_totalorlast_login_date, use attributesMetadata used for audience segmentation and personalization. Attributes extend the concept of tags by adding comparison operators and values to determine whether or not to target a user, helping you better evaluate your audience.. - When you need to read a user’s opt-ins from the SDK, for example to display current subscriptions in your app, use subscription listsAn audience list users opt in to for a specific messaging topic. Users can manage their opt-in status using a Preference Center.. This is because tags can be set from the SDK but not read.
Using tags with messaging
Tags support the following messaging capabilities:
- Targeting — Target audiences for messages, feature flagsAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes., A/B tests, and Intelligent Rollouts based on tag presence or absence. You can also include tags in segmentsA reusable audience group you create by selecting unique or shared user data..
- Triggering — Set your Automations and Sequences to run when a tag is added or removed. You can also set a tag change as a Sequence exit condition.
- Delivery filtering — Set delivery conditions on Automations and Sequences by requiring or excluding specific tags.
- Localization — Use locale and country tags in HandlebarsHandlebars is Airship’s templating language for personalization. Handlebars expressions use double curly braces wrapped around a content template, ranging from a simple variable, e.g.,
{{first_name}}, to complex evaluations of personalization data..
Targeting and setting tags can work together in a single message. For example, in a push notification about a new film release, target users with the likes_movies tag in the interests tag group and set the tapped_movie_promo tag in the engagement tag group when they tap the message. Later, send a follow-up discount to users with the tapped_movie_promo tag.
{
"audience": {
"tag": "likes_movies",
"group": "interests"
},
"notification": {
"alert": "New movie release this Friday. Get tickets before they sell out.",
"actions": {
"tags": [
{
"type": "channel",
"action": "add",
"group": "engagement",
"tags": ["tapped_movie_promo"]
}
]
}
},
"device_types": ["ios", "android"]
}Tag types, data sources, and setup
Tags can come from Airship, the Airship SDKs, and you.
The following table shows the data source, description, and setup required for each tag type:
| Type | Data source | Description | Setup |
|---|---|---|---|
| Device property | Airship SDKs or customer | The Airship SDKs automatically set device property tags on your audience based on device data such as locale, time zone, and OS. For email, SMS, and open channels, you can assign values that do not come from a device. See Device properties. | None. |
| Custom | Customer | You can add your own tags to your project, organized in tag groups you define. For example, you may want to group tags for user interests, loyalty tiers, or CRM data. | Create custom tag groups in your project, then set tags on your audience. |
| Primary device | Customer | Any tag you set without specifying a custom tag group is assigned to the device tag group. | None. |
When the app and web SDKs update Airship, all primary device tags are replaced by the data coming from the app or website. Custom tags only change when you add or remove them. Use custom tags for data you need to persist.
Feature tags
These Airship features have dedicated tags that enable their functionality:
| Feature | Tag group | Valid tags | Setup |
|---|---|---|---|
| Predictive ChurnAnalyzes your audience for users that exhibit behaviors indicating they are likely to become inactive, and tags the users as High, Medium, or Low Risk. | ua_churn_prediction | high, medium, low | Enable the feature in your project settings. |
| Optimal Send TimeAn algorithm that determines the best hour for optimal engagement activity — when each individual member of your audience is most likely to receive and act on your message. iOS, Android, and Fire OS platforms only. | ua_send_time_prediction | Hour of day (0–23) | Enable the feature in your project settings. |
| Channel CoordinationA group of strategies for targeting users where they are most likely to receive your message. | ua:orchestration | last_active, priority_platform, user_preferred | Implement named usersA customer-provided identifier used for mapping multiple devices and channels to a specific individual.. |
AutogroupA default tag group. When devices are registered in Airship, they are automatically assigned a tag within the autogroup tag group. The tag is a numeric value of 1 to 100. Some uses for autogroup tags are creating a control group, and to randomly segment your audience. Autogroup must be enabled for your account. | autogroup | A random number from 1 to 100 | Contact Airship Support to enable autogroup for your account. |
Where tags are stored
A tag stored on a contactAny user in your project. Contacts are identified as either an anonymous contact or a named user. Airship can set targeting data on these identifiers, which are also used to map devices and channels to a specific user. applies across all channels associated with that user, and a tag stored on a channel applies only to that channel. The following table shows where each tag type is stored under each segmentation system:
| Tag type | Contact-level segmentation | Channel-level segmentation |
|---|---|---|
| Custom | Contact | Contact or channel |
| Primary device | Channel | Channel |
| Device property | Channel | Channel |
Under channel-level segmentation, channel tags do not propagate up to the contact, and Airship removes a contact’s tags from a channel when you disassociate it.
For the broader audience-data storage model, see Data storage in Your audience. For details on the segmentation systems and how to check your project’s setting, see Channel-level segmentation in Segmenting your audience.