Step 5: Tags

Make sure the following guides have been completed before continuing with this article:

Overview:

Tags are segmentation attributes that help you message users based on preferences, actions, or behaviors within your app. They can be set with client code within an app, or passed server-side based on CRM information. Additionally Urban Airship lets you set tags from the UI when a user clicks on an element of a notification.

Tags are static: either on or off, and capture who a user is. You can build segments based on combinations of tags using boolean logic, or trigger messages to be sent on tag add or removal events.The table in the following section shows common tagging situations for a variety of business fields.

Custom events are dynamic; and capture what a user does. You can count how often or how much a user does something.

Both tags and custom events can be used to create audience segments and trigger messages based on the tag or event being placed or removed due to a user behavior.

Note: Tags are binary, meaning there’s no current functionality to add values or properties such as cumulative values when someone takes an action multiple times.

 

How does it all work?

Most apps benefit from these general tags:

                                                                                                                                                                        

Vertical

Tags

Retail

  • Registered User / Authenticated
  • Visited Product Category
  • Used App Feature
  • Favorited an Item
  • Added Item To Cart
  • Purchased an Item
   

Media

  • Registered User / Authenticated
  • Browsed a particular section
  • Subscriber or Non Subscriber
  • Watched Video
  • Shared something in App
  • Used Feature
   

Gaming

  • Feature unlock
  • League status
  • Level start  / completed
   

Financial / Insurance

  • Stock ID
  • Policy Type
  • Claim Type
   

Fitness, Health

& Lifestyle

  • Favorite workout
  • Favorite location
  • Logged In / Out
  • Medical Specialty
  • Feature / Product
  • Membership status
   

Sports & Recreation

  • Favorite Team
  • Watched Video
  • Membership status
 

Travel & Transportation

  • Registered /Authenticated User
  • Home City / Airport
  • Used App Feature
  • Favorites a location, resort, etc
  • Loyalty Member vs Non Loyalty Member
  • Added to cart / wishlist
  • Business or Personal Travel
  • Completed Check Out

 

As stated previously, tags can be set on a device or user level. These will be persistent attributes that you will be setting on the device based off of user behavior or preference. Because these tags are persistent, this allows you to be able to message segments of users who may or may not have a specific tag, or a list of tags, of your choosing.

 

How do I get started?

Depending on which platform you are developing for, the implementation for adding tags to your device will vary slightly. In general though, adding a tag will meet the format of the following:

iOS

// Set tags
UAirship.push().tags = ["one", "two", "three"]

// Add a tag
UAirship.push().addTag("a_tag")

// Remove a tag
UAirship.push().removeTag("a_tag")

// Update registration
UAirship.push().updateRegistration()

 

Android

UAirship.shared().getPushManager().editTags()
    .addTag("some_tag")
    .removeTag("some_other_tag")
    .apply();

 

Testing:

Now that you have integrated tags into your project, you’ll want to make sure that you can use that tag to message the devices that have that tag attributed.

When composing a new message, you’ll have the option to Target Specific Users where you can choose amongst various segmentation options, including any of the tags you have implemented.

Strategic Advice:

Tags allow you to build campaigns around a user’s interests, and can grouped together to form re-usable tag groups or segments. In addition to tagging for use of key features, think about the categories, divisions or departments your brand serves.  For sports, it might be teams and players. For media, it might be breaking news, local news, sports.

Implementation best practices:

 

Next Steps:

Now that you have Tags set up within your app, it’s time to start exploring Custom Events. Custom Events will allow you to track user activities and key conversions in your app or from your website.