App developers can easily send push notifications to their users by integrating one of the many OneSignal SDKs. Whether your app is built as a native mobile app, web app, or using an alternative mobile framework, we provide an SDK for almost any platform. Developers can use our feature-rich dashboard and API to unlock new levels of granularity when engaging user segments.

Push notifications are a fantastic tool to reengage users in order to bring them back to apps. To ensure relevancy, sometimes you want to send notifications only to folks in a particular location, or who recently performed an action, such as adding an item to their cart. OneSignal ships with built in filter types allowing just that.

Developers also have the option to take full control of user targeting by using “tags.” In this post, we dive into a broad overview of how to best use tags and how and when to use data integrated from an external DMP (Data Management Platform).

Tags

The ability to set data tags is incredibly powerful. You can store data attributes on each user. Tags are available on all OneSignal accounts and are a very popular feature among our customers. Users are tagged with attributes such as types of messages they want to receive, content categories, cart abandonment info, subscription status and user-preferences.

OneSignal's Free plan allows for the creation and usage of up to 2 data tags. Users can access more data tags by upgrading to either our Growth, Pro or Enterprise level plans.

Read more on data tags here.

Segments

Segments are created using a combination of data-tags and filters. Segments give you the ability to target users with more personalized and more engaging push notifications by dividing your total user base into specific audiences based on data attributes like activity, location, and interests.

OneSignal currently offers up to 6 free segments on our Free plan. Additional segments can be unlocked by accessing either our Growth or Pro plans.

Read more on segments here.

External User ID

You can use an External User ID to target specific users and match the OneSignal "Player Id" to your own internal user ID. To link a subscribed user to internal data sources such as a CRM or database, you can do one or more of the following:

  1. You can link your own internal User ID with the OneSignal User ID (Player ID)
  2. You can store the user's OneSignal User ID (Player ID) on your own system

The first will associate our user record with your User Account ID on our system. The second will associate our User ID with your user info on your system.

Read more on External User Id here.

Integrating Data with OneSignal

Because OneSignal allows developers to store data tags at the user level and then use them for user targeting, many developers will want to use data tags that are otherwise living in a DMP. To get those tags into OneSignal, there has to be an integration process. However, at the core of this integration lies a crucial question:

Which of the data should be stored with OneSignal and which shouldn’t?

Built-in Filters: For things like “Last session” or even “Country,” there is no need to track these things on your end because they are done automatically when you integrate our SDK into your app. You can then use these when crafting segments.

See a full list of filters here.

Integrating through the SDK:

In addition to the built-in filters, you can use the client to update custom tags automatically through the OneSignal SDKs. When you incorporate our SDK into your app, you can use tags to keep track of things like user-actions.

An example is trying to get a user to buy an airline ticket. In this example, say there are six different pages a passenger needs to fill out before clicking “Purchase.” As the airline, you can use a tag called step to track the last “step” a user was on before bouncing. As the user progresses, you can increase the step number through the SDK. You can then use this tag later to try to get them to finish checkout by bringing them back to that page.

// React example
componentDidMount() {
    OneSignal.sendTag("step", this.props.step);
}

Integrating through the API:

You can use the REST API to integrate your DMP with OneSignal. Read our reference docs for more info.

You may want to use data that live in a DMP to target users (as opposed to client-side data like in-app actions). A classic example is linking your own internal user identifier to OneSignal's player ID. This is done by setting the external User ID record using the API or the SDK.

When you use non-changing user data like zip code, you can simply filter users based on that data and use the API to send the notification to that list. But for ever-changing backend data, it may or may not make sense to send it to OneSignal as a data tag. In many cases you would have to make a constant effort to keep both versions synchronized.

Is it worth maintaining OneSignal data tags and DMP data in sync?

It turns out the answer is not so straightforward. It requires weighing a series of trade-offs that will be particular to your setup. The following are some of the major considerations:

Volume: there is a cost in computational and/or network bandwidth when going through high loads requiring synchronization. You should weigh this factor when making design choices. Records must be updated at the user-level, each requiring a separate network call.

Notification type: you may want some notifications to go out regularly while others are one-offs. For regular notifications, it could be worth setting up automated notifications to go out at a regular cadence. If data used as tags change frequently, you will want to ensure they get updated to ensure the automated messages execute accurately. For one-offs,  it’s likely not worth storing data-tags through OneSignal that are rarely used, especially if you already have a large number of tags (100 max recommended).

Engineering bandwidth: the most successful DMP integrations have deployed an engineering effort across development, data, and analytics teams.

Pre-calculate list of IDs: if you have your own way of generating a user list, you can pre-calculate the segment and send the list of recipients to the API. This also has a delivery speed benefit.


Summary

  • Target users by data tags and segments when the built-in filters don’t provide enough granularity.
  • Tags can be integrated with OneSignal through either the SDK or the API.
  • Consider your engineering bandwidth and segmentation goals when choosing how to integrate data with OneSignal.