Segments and Filtering

How to use Segments and Filters to optimize your messaging.

OneSignal's Customer Success Manager, Eyra Dzakuma, goes over how to use Segments and Filters to optimize your messaging. See how these powerful features can open up a realm of possibilities to help increase engagement and retention rates. The transcript of the webinar can be found below.



All right. Looks like we got a few more. Welcome, everyone. Thank you again for attending the webinar today on Segments and Filtering. Let's go ahead and get started.

Great. So just for a quick agenda today, we're going to quickly review segments and filtering, provide you with the definitions and the basic understanding of what those are. And then we'll actually jump right into the platform to walk through creating some segments and what all the filter types mean. And then finally, we will end with some direct question and answer session with myself.

My name is Eyra Dzakuma. I am a Customer Success Manager here at OneSignal. I've been working here for about a year and work with some of our top enterprise clients, just helping them understand the platform and the system, as well as helping them achieve their customer engagement goals. Great to be chatting with all of you today.

What are Segments?

So jumping right in, let's get into what segments are. Segments are groups of users based on data collected and sent to OneSignal. What segments allow you to do are actually to group and target specific users and devices so that you can send more personalized and engaging messages.

Basically, with segments, you can actually divide your subscriber base into specific audiences based on multiple Filter Types of data that OneSignal actually automatically collects with the OneSignal SDK. These are things you might see based on activity, language, country, et cetera.

Additionally, you can actually create segments based on custom data that you might be tracking that you send to OneSignal as well. So, that's the basic understanding of segments.

The great thing about segments is they are dynamic. What that means is that once created, they're updated automatically. So you actually don't have to do anything. You don't have to add any new setup, code or tracking, essentially, as users interact with your app or websites. They'll actually go in and out of segments according to the relevant filters. Again, segments are dynamic, they're updated automatically. Once you set them, individuals will move in and out as necessary. I love that about segments.

Additionally, I did want to point out that you can create segments directly through the OneSignal dashboard or via the API as well. For today's session, we're mostly going to be walking through how to create segments via the dashboard, just to get the basic understanding, but you can actually utilize the API to create segments as well.

Overview of Filter Types

Next, I wanted to quickly go over Filter Types. The filter types are basically all shown in the dashboard. These are filters that you can combine to create specific segments. We'll definitely be hopping into the platform shortly to go over all the filter types. But I did want to go over one thing quickly. Essentially, you can combine multiple filters with AND or OR clauses to help you get as specific as you would like.

AND clauses mean that the device must match all and filters to be included in the segment. Basically, any filters that you use the AND clause, the device must match up all of those filters or be included in all of them.

OR clauses mean a device can match either case to be in the segment. That means they don't necessarily have to meet every filter. It just has to be one of those or one or the other.

Essentially, if a device matches both OR clauses that you have, they'll actually only be included once in the segment. That way, you won't actually be sending multiple messages to one individual, which is great. Again, to repeat, if a device matches both or multiple OR clauses, they will still only be included once in the segment.

So here's a quick overview of the filter types that we have within OneSignal. Some of these probably look familiar. A lot of them are based on activities, such as First Session, Last Session, Session Count. And then some are also just based on specific device types, device settings on the device, such as language and location. And then you can also do it based off of country and even test users.


Now that we've covered what segments are, what filters are in the various types, let's actually hop right into the platform so that we can walk through creating a segment and show you how it's done.

How to Create Segments and Use Filters

So I'm just going to hop into our demo app here in OneSignal.

To get two segments, once we are in a specific app, we're going to select AUDIENCE and then SEGMENTS. And then you can see, you'll be able to see any and all of your recent segments, and you can also filter them by ACTIVE and any that you may have paused as well. And then of course, over here on the right is where you'll hit NEW SEGMENT to create any new segments.

As you can see here, these are all the filter types that we have. I did want to quickly review these just so we're all on the same page. First Session is just the first time they opened your app or website and subscribed with the OneSignal SDK active. The Last Session is just the last time they actually visited the app or website. Session Count, essentially we track how many times they've opened or visited your specific app.

You'll see Language. Again, this is the device's language. the language setting is on that particular user's device. You can actually filter by that language.

We have User Tag. This one is a little nice because, as I mentioned before, you can actually filter based on custom data that you're sending to OneSignal as well. Tags are essentially just specific user attributes that you can place on users and you can actually filter by that as well.

We have Location. Particularly, it's based for mobile devices. If you do have a mobile app and you are asking users to allow their location to be tracked, you can actually pass that information into OneSignal as well, and then filter based on that.

Then we have Country. Again, this is the countries where the user's device is, so the last time that it communicated with our servers. Essentially, we're tracking this through the... What's it called? Oh goodness. Essentially, we're tracking that off of the IP address, which you can decide, if you don't want to send that to OneSignal, you don't have to. I will note that we actually don't track any IP addresses for any EU residents.

Next, we have test users. Anytime that you would like to add yourself or some of your colleagues or coworkers as a test user, you can and then filter by that.

And then these ones, Total Duration, this is just the total amount of time that the user has been active within the app. This is cumulative.

And then Amount Spent and Purchased Items. These filters are actually reserved just for mobile devices or mobile apps, but it is pretty self-explanatory. Amount Spent is just the amount the user has spent on in-app purchases. And then Purchased Item, you can actually filter by the specific code of the item purchased.

Finally, we have App Version, so just whatever version of the app that individual user is on. You filter by specific device type.

And then Rooted is specific to mobile and actually Android only. So, that's just whether this device is rooted or not. And then again, you can filter by email address that matches the user. And then you can even filter by subscriptions, whether the user is subscribed to notifications or not.

Those are all of the filters that you can use to create different segments.

I'm going to close out of this quickly before we create one, because I did want to show you that in AUDIENCE, under ALL USERS, you can actually see all of these filters as well. I like to use this view just to get a good understanding of everything, to see all of those filters.

So again, you'll see the last active, the first session, the device, the session count, the country, the IP address, the SDK version, whether they're rooted. You'll see the location if you are passing that, usage duration, language code, and you can even see the player ID, external ID, et cetera. And then additionally, you can see the tags that you are perhaps adding or passing to OneSignal to filter as well.

Just wanted to highlight that you actually can view all of these filters that we're tracking and the automatic data that you track with OneSignal, and you can even export this information.


Let's get back to creating a segment quickly. Once I hit NEW SEGMENT, let's say I want to create... oh, actually I should say that there are four default segments that actually come within OneSignal. You'll see some of them here. Subscribe Users is a default, Active Users, Inactive Users and Engaged Users. Those are all of the four default segments that you get from OneSignal. Again, you can always edit or add these just over here. You can edit them and maybe change the filters if you'd like. But let's go ahead and create the segment.

Let's say I want to create a segment that is '7 Days Inactive'. So I'm going to label my segment up here. And then I'm actually going to base this on the last session. What I'll do is I'll create this. Select Last Session, and then I'll say, I want it to be less than, and you can do... This is in hours. Why at OneSignal we make it a little bit hard. But let's say... let me do that. I always forget that.

I see a quick question, so let me pause it. The question is asking: Are geolocation and total duration available only for Premium user?

Good question, but no. Actually, those are available for any OneSignal user. Again, geolocation, maybe I should expand on that, is essentially... Again, if you have a mobile app and you're already tracking that data, then you can pass that into OneSignal.

Here. So, let's go back to creating the new segment. Last Session, I said I wanted to do '7 Days Inactive'. Let’s do less than and in hours. I believe it's 168 hours. So you'll see that we actually do an estimate for the total amount of users in the segment.

Again, since the segments are dynamic, it's not necessarily an exact number because different users could be going in and out as they are interacting with your app or website. But the great thing is you can get an idea of how many people are in this particular filter.

Another thing you could do, when you hit ADD FILTER, I do want to be clear that that actually will be an AND clause. Let’s say I wanted to just reach out to individuals in the United States. You'll see that estimates about 11 users. Again, this is an AND. So basically, it has to be anybody that has a last session within a week, and they're also located in the US.

But let's say I wanted to combine this. So you could actually do the OR clause. What I would do, maybe I want to do last session again less than 168 hours, but excuse me, I don't want to do that. I want to do AND. I want to add another country. So let's say I wanted to take Canada as well. Great.

So this way, maybe this would be '7 Days Inactive North America'. Okay. So just want to be clear again that if you're using these AND clause, they do need to meet both of these filters. So anybody that has both of these filters will come in. But OR just means that you're getting anyone that is last session within a week is in the US or last session a week also in Canada.

Okay. Let's just go ahead and create that segment. And then once you create your segment, you’ll actually be able to see it on this list here. This is the segment that we just created. Perfect.

And then from here, as you know, once you go back to creating your messages, let's say I want to create a new push, you can select Send to Particular Segment. It defaults to Subscribe Users. But one of the points I wanted to drive home from this session is that, actually, it's not recommended that you send messages to your subscribed users all the time. We do want to make sure that we're targeting them in specific ways. So, what I'll do is I'm just going to select the segment that we just created today. Perfect.


And then I'm sure you guys know you can actually exclude segments as well. Maybe just to make sure, I don't want anyone else to get this. I'll exclude some of the other inactive users. I only want to target those in North America. And then we can create our message and we'll be good to go.

So, that's the basics of creating segments using particular filters and what those filters are. I'm going ahead and going to go back to segments. Just stay on this page. And then what I would like to do is just actually open this up to everyone to ask and answer any questions.


Okay, here. Let me see. I actually want to be able for you guys to... okay, here. There are a few questions or ask in the chat that I'll quickly go over. So, one was saying that they have a problem with user tags. "I configured some and it works for me and when users enter from browsers, but it does not take them when they enter from the app."

Okay, that's a good question, Dario. I'm not sure. We may have to do some troubleshooting there. But I can quickly review how we can actually filter by a user tag. Let’s see. Since I didn't do that, I'll show you how that goes. All right. Let’s create a new segment, and this time, oops, sorry, will do one. Let’s do maybe 'Abandoned Cart' notification. That's a good one. This one, we’re actually going to be using a user tag. This would be, again, something that a user attributes that you were already passing through OneSignal.

For instance, I have a user tag for abandoned carts called Cart Item. Anytime anyone adds anything to a cart, they get tagged with cart item in the backend. What I wanted to do is Cart Item. Let’s say time elapsed is greater than. I just want it to be... This is in seconds. So this would be one hour. 3,600 seconds is one hour. You can actually filter.

Anytime anyone has a cart, or excuse me, an item in their cart that has been in there for more than an hour, they will filter into this segment. And then that way, I can send them a notification saying, "Hey, you forgot this item," or "Still thinking about purchasing?" So, that's how you use a user tag. You can actually write in whatever the user tag is specifically.

For instance, if we go back to AUDIENCE, ALL USERS in this demo app, and we look at some of the tags here, you can see there by categories, so Food: 1, we have some with email, career, and names. But let's go ahead and just do Food.

I create a new segment and we do user tag. So Food, let's say 1. Oops. Or we could do Food 'exists'. See how many we get. Oops, I don't know if it's actually updating or if I didn't type that correctly. It is perhaps case sensitive. There we go. Okay. So now, that's a good example of it being case sensitive. I didn't need to use an uppercase F because that is what the specific tag is. Now you'll see there are 24 users in the system currently that have this user tag, that highlights that they're interested in perhaps news on food or specific notifications around food.

Again, User Tag is a great way to get a little bit more specific and more targeted. But I just wanted to highlight how you would use a user tag to segment your audience as well.

Okay. All right. There was another question, I think from Norman, about, "We have a blog working with OneSignal, but also want to install the app on your Shopify store so both are in the same domain. Can I have one single dashboard and set up segments, including both users?"

I'm not sure. It sounds like, basically, you have a blog that connects to your Shopify store. It sounds like maybe they're heading to one store or one domain. It sounds like you'd actually have them just for one particular app, which would be your store app. I do want to highlight though that the segments are only created for that specific app. So it won't necessarily... let's say maybe you have separate apps for your website and your mobile app within OneSignal. When you enter and go to your dashboard page, or for that particular app, you're actually creating segments for that app alone. The segments don't go across all of your apps.


For instance, if we go back to, once I logged in, you get to your all applications page. Again, this is just our OneSignal demo app or demo organization. But I think many of you might have, let's say, you'll have an app for your mobile app and then a separate OneSignal app for your website. Those are going to be separate within OneSignal. Anytime you'd be creating segments for your mobile app, they would only be respected for that particular app instance within OneSignal, if that makes sense.

Okay. And then I think there was one other question perhaps. Okay. I think we got it. Okay, great. Were there any other questions? Hopefully, I've heard all of the basics on segments. I would like to highlight that we are actually doing an additional webinar on Shopify next week. So I encourage you all to attend. And then hopefully, maybe we can also do a segment if you found this helpful. We can do one maybe on some more advanced filtering for segments.

It looks like we got one other question and it says, "Do you guys plan to include more segmenting options based on user behavior on dashboard in the future? Today, when we create engagement campaigns, we need to create these specific behavioral segments through user tags. It would be nice to have some preset behavioral segments."

Thank you, Carolina. That's good feedback. I think we might add some new filters in the future. I think we're always trying to improve our OneSignal app in the functionality that it has. So, that's actually really good feedback for us to hear. But you kind of hit the nail on the head. Most of what you're doing today, you are actually using because you're filtering by user tags. That makes sense.

The reason why we like to add User Tag as a filter is every client or every organization's use case is slightly different. We have added the basics here of activity in terms of First Session, Last Session. You can do this by seconds, hours, minutes. You can do it by weeks, months, days. You can add and combine all these filters in as many different ways as you want to. Last Session and Session Count are good ones. Maybe you want to reach anyone that hasn't been active in the last week, but also has only had over 50 sessions. They're definitely users of your app, but they haven't been there in a week. You want to get them back. Combining these types of things is helpful.

The idea is that you actually can add as many different filters and create one specific segment, but we do encourage you to use the user tags to get a little bit more granular with some of your specific use cases and what you would like to do. But definitely noted, Carolina, that perhaps adding some additional filters around other activities would be helpful.

All right. I think we need to make sure there weren't any others. I know we're a little bit over time. Actually, the best way to reach us is actually at our support or chat. The best way to reach us - I'll show you really quickly - is, so once you're in the dashboard, you can actually just hit this button here to chat directly with anyone at OneSignal. And then you can actually send an email directly to I'm definitely in the support channels. So you can reach me or also some of my awesome, helpful colleagues as well.

It looks like there may have been one other question. Just want to make sure I get everything. Okay. There was one question about where do we tag users. And it says, "From the data we pushed to OneSignal or inside OneSignal user listing?"


Great question. Actually, tagging is data that you would actually be sending or adding to OneSignal. Tags are not created automatically because again, they're based on every specific organization's use case. Maybe I am a news site and I need specific tags around categories of news, such as sports news, travel news, political news. Those would be good tags. Generally, a lot of our clients are actually passing in or sending in those tags into OneSignal based on their own current database, like your own current CRM system. That's essentially how you can get your tags into OneSignal, either that way, or you can actually initialize them via the SDK as well.

So, what I'll do, everyone, thank you so much for attending and the questions and the participation. Hopefully, this has been helpful. What we'll do is we'll send this video recording out to you via email, so all of you that attended today. And then I'll also include our specific documentation, that review segments. Everything that we've gone over today is also highlighted in our documentation here. And then additionally, I'll send some additional links for user tags, just because that does go hand in hand with helping you create some further segments.

Perfect. I think that's everything. Thank you all so much for attending and for asking questions. I look forward to helping you guys move forward with OneSignal and creating some awesome segments and reaching your users in the best way.

Thank you, everyone. Have a great day.