You can define your audience based on named users, attributes, tags, tag groups, and Airship channel IDs.

Named Users

Named Users allow you to associate multiple devices to a single user or profile that may be associated with more than one device, e.g., an end-user’s tablet and phone. A device can have only one Named User, and a single Named User should not be associated with more than 50 devices. Named Users provide the ability to directly set tags on them.

By default, Named Users can only be associated server-side, via the API. A 403 Forbidden response is returned if Named User association is attempted when client-side association is disabled. In order to associate a Named User through the application, you must change the application’s Named Users security setting to allow Named Users to be set from devices. See: Enable Named Users.


Associating the channel with a Named User ID will implicitly disassociate the channel from the previously associated Named User ID, if an association existed.

Associating the Named User
Disassociating the Named User
Getting the Named User
UrbanAirship.getNamedUser().then((namedUser) => {
  console.log('Named User: ', namedUser)


Attributes are metadata that you can use for audience segmentation. Attributes differ from tags in that when evaluating users with attributes, Airship uses operators, e.g., equals, less than/greater than, contains, before/after, to determine whether or not to target a user. Supported attribute types are TEXT, NUMBER, and DATE. For more information see the attributes guide.

Channel Attributes Example
        .setAttribute("device_name", "Bobby's Phone")
        .setAttribute("average_rating", 4.99)
Contact Attributes Example
        .setAttribute("first_name", "Bobby")
        .setAttribute("birthday", Date(524300400000))

Tag-based segmentation

Tags allow you to attribute arbitrary metadata to a specific device. Common examples include favorites such as sports teams or news story categories.

Modifying tags
UrbanAirship.addTag("some tag");
UrbanAirship.removeTag("other tag");
Getting tags
UrbanAirship.getTags().then((tags) => {
  console.log('Tags: ', tags)

Tag groups

A tag group is an array of tags that you can associate with both channels and named users. In addition to the Airship default tag groups, you can create custom tag groups in the dashboard. See the Tag Groups documentation for more details, including security information.

Channel Tag Group Example
        .addTags("loyalty", ["silver-member"])
        .removeTags("loyalty", ["bronze-member"])
Contact Tag Group Example
        .addTags("loyalty", ["silver-member"])
        .removeTags("loyalty", ["bronze-member"])

Airship Channel IDs

The Channel ID is a unique identifier that ties together an application/device pair on a mobile device. The Channel ID is used to target pushes to specific devices using the Airship API. Once a Channel ID is created, it will persist in the application. It may or may not change when the application is reinstalled. For more information on platform-specific operation, see the Android and iOS documentation.

Don’t worry if this value initially comes back as null on your app’s first run (or after clearing the application data), as the Channel ID will be created and persisted during registration. To receive an event when the Channel ID is created, see Listening for Events.

Getting the Channel ID
var channelId = UrbanAirship.getChannelId().then(channelId => {
  console.log('Channel: ', channelId);