Segmentation reference

A complete list of segmentation rule types and how to use them.

Basic

Segment of audience

This criterion is only available from the notification edition interface. It lets you specify a segment used for targeting. You can also specify the complement of this segment by selecting is not matching.

It is considered good practice to setup segments in the Segments tab and use them through this criterion in the notification edition interface.

Last activity

Lets you target users whose last activity is before or after a given date, between two dates, older or newer than a certain amount of time. Last activity date is the date of the latest event sent for a given installation.

Example:
Last activity – is older than – 2 days.

This example matches all users whose last event was sent more than 2 days ago.

Presence

Lets you target users currently present or absent of your app / website. In particular, you can target users:

  • present since more (or less) than a certain amount of time,
  • absent since more (or less) than a certain amount of time,
  • absent for more (or less) than a certain amount of time.

Please note that this criterion is precise to the minute, except for plain HTTP websites which only offer a granularity of 15 minutes.

Examples:

  • User is present since more than 10 minutes: matches users currently on your app / website, that have had a continuous presence for more than 10 minutes.
  • User is present since less than 1 minute: matches users that just got to your app / website less than a minute ago.
  • User is absent since more than 1 day: matches users that are currently not on your website, and haven't returned since at least 1 day.
  • User is absent laster more than 1 day: matches users that might or might not be currently on your website, but that spent at least a day without visiting. This day might be in the far past.

Language

Lets you target users by language. You can set the language in every platform using our SDKs (except Android), and this language defaults to the device or browser language.

To set the language:

<html lang="fr">
  <!-- Use the "lang" attribute of the HTML tag to set user language -->
WonderPush.setLocale('fr') // sets the language to french
[WonderPush setLocale:@"fr"]; // sets the language to french

Country

This criterion lets you target users by country. Country is read from device / browser settings.

Timezone

This criterion lets you target users by timezone. Timezone is read from device / browser settings.

Events

User event

Lets you target users that generated at least one event of a given type, optionally within a certain amount of time from now.

Examples:

  • User event of type @NOTIFICATION_OPENED newer than 1 days: targets users that clicked on a push notification less than 24 hours ago,
  • User event of type @NOTIFICATION_OPENED: targets users that clicked on a push notification once in their lifetime,
  • User event none of type @NOTIFICATION_OPENED: targets users that never clicked on a push notification in their lifetime,
  • User event none of type @NOTIFICATION_OPENED newer than 1 days: targets users that did not click on a push notification in the last 24 hours.

Notification clicked

Lets you target users that clicked on one or more campaigns of your choice, optionally since a given amount of time.

Event custom field

There are multiple declinations of this criterion, specialized per type of event attribute: string, int, short, date and bool.

Lets you target users that generated at least one event of the given type with the given attribute matching a given value, optionally within a given timeframe.

Examples:

  • Event custom field (string) is equal to 'garden' in field 'string_category' User event of type 'purchase': target users that generated the custom event purchase containing a string_category attribute with a value of 'garden',
  • Event custom field (string) is equal to 'garden' in field 'string_category' User event of type 'purchase' newer than 1 day: target users that generated a custom event purchase less than 24 hours ago, containing a string_category attribute with a value of 'garden'.

Installation

Tags

Lets you target users that have / don't have the specified tags.
See Tags for more information.

Installation date

Lets you target users that subscribed to push notifications less / more than a given amount of time ago, before / after or between given dates.

Properties

There are multiple declinations of this criterion, specialized per type of property: string, int, short, date and bool.

Lets you target users that have properties matching the specified criterion.
See Properties for more information.

Application version

Lets you target users that subscribed to push notifications and are running a particular version of your app or website. On iOS and Android, this is the version of your app as specified in your Manifest / Info.plist. On your website, you can specify the version like this:

// Application version is set in the init call
WonderPush.push(['init', {
  webKey: 'YOUR_WEBKEY',
  // ...
  applicationVersion: 'YOUR_VERSION',
}]);

SDK Version

Lets you target users that subscribed to push notifications and run your app / website with a specific version of the WonderPush SDK.

OS Version

Lets you target users that subscribed to push notifications and run your app / website with a specific version of the the operating system.

Installation id

Lets you target users by their installation ID. Installation ID can be found on the installation detail page.

Push token

Lets you target users that are subscribed, users that have opted out, users with a specific push token.

Device id

Lets you target users by device ID.

Device model

Lets you target users by device model.

Device platform

Lets you target users by device platform.

Device carrier

Lets you target users by device carrier.