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

Segments

OneSignal features - Segmenting your users

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.

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 subscribed users. A subscribed user is eligible to receive your app's push notifications for your specific app. The user has opted to receive push notifications and has a valid push token.

There are no limits on the number of filters you may add to a segment or the number of segments you may create in OneSignal. Segments may only be created from the Dashboard, but segments may be referenced from the SDK and API.

Segments Page

Dashboard > Users > 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. A default segment 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.

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

advanced

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
Description

FIRST SESSION

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.

LAST SESSION

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

SESSION COUNT

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.

TOTAL DURATION

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

AMOUNT SPENT

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.

PURCHASED ITEM

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

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

APP VERSION

Version of your app

DEVICE TYPE

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

USER TAG

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

LOCATION

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

IS ROOTED

Android - whether devices is rooted.

SUBSCRIPTIONS

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

COUNTRY

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

TEST USERS

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

APP INTERESTS

Android Mobile Only Based on the category an app provides Google when submitting to the app store.


FAQ

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?

Presently there is no way to view users by segment. We've gotten feedback on this and will be offering this capability in the future. In the meantime, you can follow our instructions on Exporting Data to do your own analysis on your users.