How to Use Data Tags in OneSignal

Tags are one of our most powerful features for advanced targeting and engagement. Tags enable you to store arbitrary data for each user which can then be used to build custom audiences and personalize messages, and are a very popular feature among our customers.

This post is for both customers in the implementation phase, as well as customers looking to get the most out of OneSignal. We’ll dive into why you should use tags, how to set them up, and future plans to make tags even more powerful.

What Are Tags

Tags are a key/value store for arbitrary data you want to store on a user record. They look like this:

{"firstname": "Jon", "gender": "male", "tutorial_status": "completed"}

Tags can be added to OneSignal using either our API or directly from a device running our SDK.

Why Use Tags

Tags unlock three important features of OneSignal:

1. Build specialized audiences

The most frequent use of tags by customers is filtering users by certain attributes. Popular types of tags include app activity, user account information, and demographics.

For instance, customers often check whether users have completed app onboarding, which allows them to send targeted messages to users that may have dropped off before understanding the app’s value proposition. Customers will also frequently store whether a user has a certain type of account or account privileges, such as if they’re a VIP, Premium User, etc. Having tags for these attributes let customers send highly targeted messages to their most valuable users.

2. Personalize messages to users with Variable Substitution

OneSignal supports Variable Substitution using tags which allows templated messaging. For example, customers that want to send a welcome message may prefer to use the user’s name, rather than a more generic message. This is made possible by sending OneSignal the user’s name as a tag.

To learn more about variable substitution, take a look at OneSignal Tag & Variable Substitution Documentation.

3. Build helpful linkages to internal CRM systems

Many customers use internal CRMs or other systems to link their user records with OneSignal user records, which provides a deeper sense of who customers are and helps enable offline analytics. These linkages are made by tagging a OneSignal user with the internal user ID. We support automatic indexing of such identifiers in tags as long as they are stored with the key user_id.

Tag Implementation and Recommendations

To help you get started with tags, we’ve written an in-depth Tag Implementation Guide. This guide covers a) how to set tags up, b) what tags we recommend sending, and c) important details & guidelines when using tags. We recommend both clients new to tags and those already using tags to take a look.

Coming Soon: More Tagging Features

We have some exciting new updates coming to tags in the coming months, based on customer feedback. Our goal is to make tags easier to use when building audiences with segments, and we can’t wait to show you what we’ve cooked up. We recommend clients review the implementation guide in preparation for these changes, so you can make the most of these changes when we launch them!