Attributes

Attributes are key-value pairs that you associate with your audience to help better target them with messages. Use attributes to target audiences with greater specificity than you would with tags.

Attributes extend the concept of tagsMetadata associated with a device or user to track user attributes or behavior. Tags are case-sensitive. by adding comparison operators and values to audience expressions, helping you better evaluate your audience.

Airship supplies and automatically assigns a set of default attributes for you. You can also define custom attributes. Custom attributes can be set on ChannelsAn instance representing an entity addressable via the Airship service, e.g., an iOS device, email address, SMS number or web browser. The channel instance or channel object contains all relevant information about a channel, including metadata used for targeting, opt-in status, device-specific information, and, importantly, a unique identifier for the channel, the channel ID. and Named UsersA customer-provided identifier used for mapping multiple devices and channels to a particular user. . Airship supports text, number (numeric and decimal), and date attribute types.

For TEXT and NUMBER attributes, you will target your audience using equals, contains, less, greater, and is_empty operators.

For DATE attributes, you will use before, after, equals, or range (indicating the target attribute should fall between two dates that you provide).

Attributes Example

Consider the example below — you want to target fans of the actor Chris Pine. To accomplish this, you specify an audience of users with the tag chris_pine. Either a user has this tag, or not. Note: These API examples can also be used in the dashboard.

Tag audience:
{
   "audience": {
      "tag": "chris_pine"
   }
}

But let’s say you wanted to target fans of All The Chrises: Chris Pine, Chris Evans, Chris Pratt, and Chris Hemsworth. With attributes, you can set your audience to target users whose favorite_actor attribute contains the value chris, and you will reach all the Chris fans.

Attributes audience:
{
   "audience": {
      "attribute": "favorite_actor",
      "operator": "contains",
      "value": "chris"
   }
}

It’s a silly example, but hopefully you can begin to see the power of comparison operators for attributes.

Attributes for Named Users

You can set attributes at both the ChannelAn instance representing an entity addressable via the Airship service, e.g., an iOS device, email address, SMS number or web browser. The channel instance or channel object contains all relevant information about a channel, including metadata used for targeting, opt-in status, device-specific information, and, importantly, a unique identifier for the channel, the channel ID. and Named UserA customer-provided identifier used for mapping multiple devices and channels to a particular user. levels. In general, we recommend that you store attributes at the named user level so you can take advantage of your attributes across any of the channels belonging to your users.

Storing attributes at the named user level helps you build and maintain a cohesive relationship with your audience across any of their channels. Setting attributes at the channel level limits the scope of the attribute to that channel.

For example, if you store the favorite_actor attribute from the example above at the named user level, you can target all contacts who are fans of Chrises over any of their channels. You can keep your audience up to date on Chris-related news, no matter what channels they use to communicate with you.

Use attributes to send to any channel associated with a named user
graph LR A[Named User
with Attributes] B[Attribute Selector] subgraph Audience C[App Message] D[SMS] E[Web Notification] end A --> B B -.-> C B -.-> D B -.-> E

If you store the favorite_actor attribute at the channel level, you can only target fans of Chrises on the specific channels bearing the favorite_actor attribute, limiting the scope of Chris-related communications.

Attributes at the channel level are limited to that channel
graph LR A[App Channel
with Attributes] B[Attribute Selector] subgraph Audience C[App Message] D[SMS] E[Web Push] end A --> B -.-> C

Get Started With Attributes

Follow the steps in Set Up and Manage Attributes to:

  • Upgrade your SDKs
  • Define custom attributes
  • Set attributes on channels or named users — You can set attributes:
    • From the SDK
    • Using the /channels/attributes API
    • By uploading a CSV from the dashboard or over SFTP

Target Your Audience Using Attributes

 Important

Attributes are a new feature in Airship. Some aspects of the feature are under development as a part of our beta program. If you want to participate in the beta program, complete our signup form.

Currently in beta:

  • Targeting your audience using attributes
    • In the API:
      • You can target text, number, and date attributes.
      • Attributes can be combined with tags and audience lists.
    • In the dashboard:
      • You can target text and number attributes only.
      • You can combine multiple attributes, but attributes cannot be combined with other data types, e.g., tags and audience lists.

See our API Reference:

You can target audiences using attributes through the dashboard or the API: