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


OneSignal features - Segmenting your users

Segments give you the ability to group and target users with more personalized and engaging messages. You can divide your total user base into specific audiences based on Filter Types of data automatically tracked by OneSignal like activity, sessions, device type, country, language, and custom data you send to OneSignal via Data Tags.

Segments are created by adding Filters that target data attributes. For instance, you can filter users that have opened your app in the last 72 hours, or users that have purchased an item from you before. You can create segments with many filters and advanced operators (such as AND, OR, etc).

If a segment has no filters added, the segment will contain all users. Depending on the subscription status (subscribed or no) and subscription channel (push, email, in-app message), they may be eligible for multiple or no messages.

Segments Page

Dashboard > Audience > Segments
The Segments page is where you can view an overview of your segments and add / edit / delete segments:

Each segment shows the filters used to create the segment and the total user count of that segment.

Built-In Segments

By default, every app has four built-in segments: All, Engaged Users, Active Users, and Inactive Users.

Subscribed Users

All users in your app that are subscribed to receive notifications.

Engaged Users

Users that have logged in to your app/site frequently.

Active Users

Users that have logged in to your app/site recently.

Inactive Users

Users that have not logged in to your app/site for a long time.

Note: Some clients may not have every user segment due to recent changes in OneSignal built-in segments. Also, the Subscribed Users segment may be listed as All.

Default Segment

Once a segment has been created, it can be set as a default segment which will be used to set the default audience for sending notifications through the dashboard. When you first create an app, the Subscribed Users segment will be set as the default segment. If you wish to delete a segment that is a default segment, assign a different segment as default before deleting it.

Example setting a "Test Users" segment as default:

First make sure to add some users as Test Users from the All Users page.
Create a "New Segment". Name it "Test Users" (or whatever you like) and select the Test Users filter. Then click "Create Segment".

Click the newly created segment and select "Set As Default" at the bottom.

This will now be the segment that is automatically selected when sending messages from the OneSignal Dashboard.

Creating Segments

To create a segment click on the 'CREATE NEW SEGMENT' button, which opens the Segment Editor.

Adding a Filter

When first creating a segment, all the possible Filter Types you may use to create a segment are presented (for more information, see Filter Types below). Each Filter Type has different options you need to fill out, based on the type of data it is. For instance, the SESSION COUNT filter type requires both the operator (Greater than / less than / equal to / not equal to) and the number of sessions.

User Counts

Once you've added a filter, the number at the top of the segment will update. This shows the number of users within the segment, and this number also appears below a group of filters.

Adding Multiple Filters

After adding your first filter, the 'ADD FILTER' button will add another filter to a segment, allowing you to combine multiple filters together. When filters are combined, only the users that pass all the filters will appear in the segment.

For instance, you may have a SESSION COUNT filter of greater than 20 sessions, and a FIRST SESSION filter of after 72 hours. In this case, users must have both logged into your app more than 20 times AND started using your app more than 72 hours ago.

Naming and Saving Segments

To name a segment, click the empty box at the top of the segment editor and type in a name. Once you've named your segment, just click 'Create Segment' to create it. The segment will appear at the bottom of your segment list.

OR Operators


By default, every filter added in the Segment Editor uses this AND operator. If you want to add filters without having them combined with other filters, you can instead click 'ADD OR' to separate groups of filters. While adding filters, the number of users in the segment will update, both at the top of the page, and underneath each OR divider.

For instance, in the video below you may want to check engaged users by either 20+ sessions and last login less than 72 hours ago, OR 5+ sessions and last login less than 24 hours ago:

Deleting Filters within Segments

Simply click on the 'X' next to a filter to delete it from a segment. Note that any time a filter is added or deleted, the audience count is updated.

Deleting Segments

If you ever need to delete a segment, just click on the segment from the segment list, and click the DELETE SEGMENT button in the bottom left corner of the Segment Editor.

Note: You cannot delete segments that are used in Automated Messages until you have first removed them in Automated.

Viewing Users in Segments

Within Segments, you can see users within any segment by clicking on that segment's View Users button. This links to All Users and shows the list of users within the selected segment. You may also filter by others segments within the All Users interface:

Filter Types

Filter Type


Mobile - The first date/time the user's device communicated with OneSignal servers.
Web Push - The first date/time the user subscribes to your site.


The most recent date/time the user's device communicated with OneSignal servers. Updated both when users arrive and leave app / website.


Mobile - The number of times the user's device has opened your app.
Web Push - The number of times the user visited your website after not having the website open previously.


Mobile - The total number of seconds the user's device has had your app open.


The amount the user has spent on In-App Purchases
iOS, Android, Amazon - this data is available without additional work
Windows Phone, Web Push - you must integrate in-app purchase data as a tag and filter based on that tag.


Filter by code of In-App Purchase item

iOS, Android, Amazon - this data is available without additional work
Windows Phone, Web Push - you must integrate in-app purchase data as a tag and filter based on that tag.


Language of user's device. See Language & Localization for possible codes.


Version of your app


Device operating system: Android, iOS, Windows Phone, Chrome, Firefox, Safari, or Email


Requires Data - Tags you have added to the user's device. See Data & Tags for more details.


Requires Data - Radius in meters from a particular geocoordinate (lat, long).


Android - whether devices is rooted.


Advanced - iOS, Android, Windows Phone ONLY - Whether user is not subscribed to notifications from another app you have access to.


Country the user's device was in the last time it communicated with OneSignal servers.


Includes all test users that you have set up in Test Users


How do I add specific users to a Segment?

Because segments are created by filters, you will need to add a tag for each user you wish to be in a segment. Then, when creating the segment, add a "User tag" filter to your segment matching the same tag.

Why do I have zero users in the All Segment?

See All users are shown as not subscribed in our Troubleshooting guide.

How can I view all the users in a segment?

You can view and export all users in a segment by going to the 'Users' tab, then 'All Users', and then selecting the segment of interest from the drop-down menu on the left. Detailed instructions are here: Exporting Data.

How can I target Web Desktop vs Web Mobile Subscribers?

Unfortunately we do not provide a way to detect mobile vs desktop devices for our Web Push SDK but we will be adding this eventually.

In the meantime, you would need to setup your site to detect if the user is on mobile or desktop and then show the proper code.
You can try this stackoverflow for detecting users:

Then see our Add Data Tags Guide for more on tags.

We suggest tagging users with "mobile":1 or "desktop": 1 and then querying for them based on the exists operator. This would be the most performant solution on our side until we provide the solution through our system for you.

What kind of in-app purchases are tracked and how can I import historical in-app purchases?

The OneSignal mobile SDKs will automatically track all previous in-app purchases as soon as the device opens the app with our SDK active, with the exception of 2 types:

1 - Previously bought "Consumable" in-app purchases. These are tracked with our SDK active but not previously bought without our SDK.

2 - Subscription based in-app purchases.

Android docs:


OneSignal features - Segmenting your users

Suggested Edits are limited on API Reference Pages

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