OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Users

Managing and understanding your users in the OneSignal Dashboard.

Dashboard > Users

OneSignal tracks users as devices on mobile apps, browser profiles on websites and email addresses. Each user record gets assigned a Player Id

For web, user records are created once a browser profile tied to a device subscribes to your site. If you share browser profiles on multiple devices, only the device that subscribed to the site will get notifications.

For mobile, user records are created when the device downloads and opens the app. On Android, users will get subscribed automatically upon opening the app. iOS users generally get prompted before they can subscribe. More details on iOS 12 Features.

These user records get counted towards Total Users, Subscribers and Monthly Active.

Importing User Records From Another Provider?


Managing Users in OneSignal

As mentioned above, OneSignal tracks a "user" as a device and is given a Player Id when they subscribe to your website or open your mobile app with the OneSignal SDK active.

Any subscribed device that unsubscribes will be detected and marked in OneSignal when they:
1. Interact with our SDK (increasing Revoked Count)
2. After you sent 2 notifications to the unsubscribed device.
If you target devices directly by API, we also share the unsubscribed devices in a callback the "invalid_player_ids" or "invalid_external_user_ids" which you can process in your Internal Database, DMP, & CRM.

Dashboard User Management:


Player Id

The OneSignal PlayerID is a UUID (Unique Universal Identifier) that OneSignal gives all devices that use your mobile app or subscribe to your site.

The format is lowercase letters and numbers 8 characters-4 characters-4 characters-4 characters-12 characters.

A common practice is to tie the OneSignal Player Id with your Database Id or External User Id. See our Internal Database, DMP, & CRM for more on this setup.

When does the OneSignal Player ID change?

OneSignal makes a best effort to keep the same Player ID on all devices that are assigned. Some circumstances that may cause it to change:

Web Push - When the user clears their cookie data for your site.

Android - If the user has opted out of the Google Ad id, uninstalls the app and re-installs.

iOS - If the user does not have any other apps installed that have your IFV (Identifier For Vendor), then uninstalling your app and re-installing it, will give them a new Player ID.

The IFV is used to keep the ID the same after a full re-install, but only if the user has another one of your apps installed.

Finding Player IDs

Please see Finding Users


FAQ

Managing Multiple Users On One Device

To manage multiple users that share a device, you will need to detect when User A is on the device and only send them their notifications when they are on the device, otherwise User B will get them.

Method A: Tagging

One way to handle this is to tag the user when they sign in to the app, then you can target them by the tag and they will get the notification if the tag is set. Once they log out of the app, you can remove the tag.

So if User B is using the device, then they will get their own tag and will not get User A's notification.
So the users will only get the notifications when they are logged into the app.

Method B: CRM or Database

The other option is to store on your server the Player IDs of the devices the user is currently logged in with, and then use our API to send notifications using the "include_player_ids" API targeting parameter.

Please see Internal Database & CRM

Managing One User On Multiple Devices

Each user that accesses your site or app from a different device or browser profile will get a new and unique OneSignal Player ID.

You can ensure that you are targeting the same user across different devices in 3 ways:

1 - Add Data Tags to the user with some identifier, like their email or your external user ids.
2 - Use the setExternalUserId method to add your unique external_user_ids to the device
3 - Track the OneSignal player ids for each device on your own database. More details in Internal Database & CRM to keep track of Player IDs or External User Ids.


Users


Managing and understanding your users in the OneSignal Dashboard.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.