Segment and target options

Choose a segment based on technology version, behavior, location, user attributes, random user buckets, and more

Segments allow you to create groups of users based on behavior, devices, locations, and other properties.

1520

To create a segment in the Target of a message, campaign, A/B test, or in the Users and Analytics Dashboards, start by selecting one of the criteria from the All Users/Add segment dropdown (pictured above).

The tables below define all of the segment criteria/dimensions available in Leanplum.

📘

You can modify these segment criteria using operators like "is greater than" or "is less than," depending on the type of segment. This article is about your segment criteria options, but you can learn more about your operator options here: Segment operators. For more on putting these segments and operators together, see Building segments and targets.

App version

DimensionTypeDescriptionUse Case
App VersionnumberThe version/build number of your application.Target users where app version is less than 4.0 to send out reminders to update.

Saved segments

DimensionTypeDescriptionUse Case
Saved segmentsegmentConsists of any combination of segment criteria that you save as one segment.Send a message to our segment  "NYC_iPhone_Users."
Not saved segmentsegmentTargets all users besides those in one of your saved segments.Send a campaign to all users except our "Power_Users" segment.
Contents ofsegmentPopulates the target phrase with the contents of one of your saved segments (allows you to view or edit the individual aspects of that segment).See the contents of our "Power_Users" segment.

Behavioral (Events and states)

With Leanplum, you can segment based on custom events, states, and parameters specific to users' activity in your application. Here’s a quick refresher on each of these data types:

  • Events: Anything that can occur in your app. Events include clicking on a link, sharing, purchasing, etc.
  • States: Any part of your app a User can be in for a period of time. For example, some states can include watching a video, playing a particular game level, or browsing an In-App store. All states have a time and a duration. Duration is set automatically when one state begins and the previous one ends.
  • Numeric parameters: Additional data associated with an event or state. For example, if an event is "Level 1 complete," you could apply a numeric parameter for "Level Score." (Text parameters can only be viewed in Analytics reports, not in Users or segmenting options. See here for more.)
DimensionTypeDescriptionUse Case
Occurrences of event or statenumberThe number of times a user has done a given event or state in the user’s lifetime.Target users where Occurrences of “main menu” is greater than 2.
Value of eventnumberThe total numeric value applied to an event.Target users where Value of “Power Used” is 100.
Time of the first occurrencedatetimeThe first time a user has done an event or state.
Note: can be days, weeks, hours, MM/DD/YYYY, hh:mm, yesterday, etc.
Target users where First occurrence of "Added Item to Cart" is not since 2 days ago
Time of last occurrencedatetimeThe last time a user has done an event or state.
Note: can be days, weeks, hours, MM/DD/YYYY, hh:mm, etc.
Target users where Last occurrence of "Checkout" is prior to 1 week ago

Monetization (Behavioral)

DimensionTypeDescriptionUse Case
Lifetime valuenumberThe total lifetime value of the user, determined by the user’s total value of the monetization event.Target users with Lifetime value of over $500 to send a special coupon.
Non-paying userssegmentSelects users with zero or negative lifetime value determined by the monetization event.Target Non-paying users to send a special offer.
Paying userssegmentSelects users with positive lifetime value.

Note: Determined by the monetization event—see developer documentation.
Selects users with positive Lifetime value. (Determined by the monetization event—see developer documentation.)

Test devices

DimensionTypeDescriptionUse Case
All developer devicesbooleanIncludes all devices that have ever been used in developer mode.Target all developer devices to test a new feature.
Registered test devicesstringIncludes all test devices registered for a given account.Target all devices of a certain developer to test a message before sending to users.

Lifecycle state

DimensionTypeDescriptionUse Case
First-time userssegmentUsers who have had at most one session.Target First-time users for a notification that welcomes them to the app and thanks them for joining.
Returning userssegmentUsers who have had more than one session.Target Returning users for a test to see if their behavior is changed by a new main menu experience.
Time of first run
(First session)
datetimeThe time in which users have first run the application.
Note: If no time is specified, the time value defaults to midnight.
Target users where Time of first run is at most 1 day ago for welcome promotion.
Note: Only use inequality operators with times, such as since, prior to, and between. The operator “is” will not match any users.
Last active
(Last session)
datetimeThe time in which the user was last active in the application.Target users where last active is 5 days ago for re-engagement.
'# of prior sessionsnumberThe lifetime number of sessions for a user, defined by 30 minutes or more of inactivity.Target users where '# of prior sessions is greater than 9—to reward your most loyal users with a coupon.
Logged-in userssegmentFor clients with their own User IDs (usually created by a User setting up an account), the User ID can be passed to Leanplum to determine if the User is logged in or out.

If the user is anon, they're classed as logged out. If the user has an active User ID, they're logged in.
Target logged in Users to message them with special offers and promotions.
Logged-out userssegmentSee logged-in definition.See logged-in example.
Minutes previously spent in app
(Combined session time)
numberThe lifetime number of minutes a user has spent in the application.Target users where minutes previously spent in the app is at least 10 for an in-app message reminder.

Localization

📘

Note on location:

Leanplum's SDK uses IP-based geolocation for all users, and GPS/Cell-based geolocation from the user's device if available. GPS/Cell-based information is always trusted more — we use reverse geocoding to determine the location. Geolocation is gathered only on app start or resume, so user location is the user's location during the most recent session.

We provide methods to disable automatic collection of GPS/Cell-based geolocation (not IP), as well as a method to set user location manually. See our SDK docs for more information.

DimensionTypeDescriptionUse Case
CitytextThe user’s city as determined by their last known location.Target users where City is not Los Angeles.
CountrytextThe user’s country as determined by their last known location.Target users where Country is US
LanguagetextThe language the user has selected on their device (matches the language portion of the user’s locale).Target users where Language is Spanish.

Tip: This will include any locales/countries where the language is set e.g. Canadian French and France French.
LocaletextThe locale (language + country) the user has selected on their device — used for localization preferences, including language, currencies, number and date formats.Target users where Locale is en_US (US English)

Note: The country portion of locale may not match the country the user is actually in. For example, a user may see currency formatted in pounds, but travel to the US. That user would have en_GB as their locale but US as their country.
LocationtextUser location based on last known device location.Note: If the radius of the campaign is less than 20km, Location only includes users with CELL or GPS Location accuracy. For radius over 20km, estimated locations based on IP address are also included.
RegiontextThe user’s state or province as determined by their last known location.Target users where Region is California.

Note: For Canadian provinces use the abbreviation, e.g. QC for Quebec.

Timing

Leanplum accepts many different date/time formats for use with our time-specific segment types, such as:

  • MM/DD/YYYY -->  08/05/2015
  • MM/DD/YY --> 08/05/15
  • X months/weeks/days ago --> 3 days ago
  • MM/DD/YY XX:XX AM/PM --> 5/13/16 12:01 am
  • MM/DD/YY  XX:XX --> 5/13/16 00:00 to 5/13/16 23:59 

📘

If a date without a time is specified, the time will default to midnight (00:00) that day. 
Only use inequality operators with times, such as since, prior to, and between. The operator “is” will not match any users. For more on date time operators, see [Time-related targeting operators.

DimensionTypeDescriptionUse Case
Session start in Pacific timedatetimeA specific day/time in Pacific time when the user has logged a session. See formats above.Target users where Session start in Pacific time is since 12/2/2016.
Session start in user’s timezonedatetimeA specific day/time in the user’s timezone when the user has logged a session.Target users where Session start in user’s timezone is between 12/2/2016 and 12/9/2016.
Session start time in user’s timezonetimeA specific time of day in the user’s timezone when the user has logged a session.
Note: Use 12-hour (hh:mm AM/PM) or 24-hour (hh:mm) time.
Target users where Session start time in user’s timezone is between 12:00 PM and 1:00 PM to capture lunch-time users.

Note: Your target should be a time range rather than a specific time.

Technology

DimensionTypeDescriptionUse Case
Device modeltextThe specific model of a given device.Target users where Device model does not contain iPad.
OS nametextThe operating system of the device.Target users where OS is not iOS.
OS versiontextThe specific operating system version a given device is running.Target users where OS name is iOS AND OS version is less than 8.0.
Browser nametextThe browser name that the user is running (only set by the HTML5 SDK).Target users where Browser name is Chrome.
Browser versiontextThe specific browser version a user is running (only set by the HTML5 SDK).Target users where Browser version is at least 2.
Push enabledbooleanThe device has a push token. (Includes data-only notifications.)Target users where Push enabled is off with an in-app message.
Text push enabledbooleanThe device has a push token. On iOS, the user must also have enabled Alert-style user notifications.Target users where Text push enabled is off with an in-app message.
Email EnabledbooleanUsers with a known email addressTarget users where Email enabled is on with a new email campaign.

Source (User acquisition)

The attribution details for specific users are generally given through 3rd party attribution providers who pass the source details to Leanplum via a postback (webhook).
If you work with a specific 3rd party and want to know if we can integrate, please contact your CSM.

DimensionTypeDescription
Publisher IDtextThe ID of the specific publisher that the install came from.
PublishertextThe name of the specific publisher that the install came from.
Sub-publishertextThe name of the sub-publisher that the install came from.
SitetextThe name of the site that the install came from.
CampaigntextThe name of the campaign that the install came from.
Ad grouptextThe name of the ad group that the install came from.
AdtextThe name of the ad/banner that the install came from.

User attributes

User attributes are key-value pairs that describe properties of a User. Keep in mind that User attributes may change after a target segment gets evaluated.

User attributes can store any custom data you collect from your Users. For example, you might set up some attributes like “firstName,” "gender," or “destinationCity.”

DimensionTypeDescriptionUse Case
Customnumber, boolean, text, list, or datetimeCustom key-value pair that you can associate with your users.

Note: Keep in mind that user attributes may change after the target gets evaluated.
Target Users whose points value is between 100 and 200.

🚧

The ISO-8601 timestamp format will work for user attributes being used as message targets, but you will not be able to filter or search for these attributes in Analytics or the Users page. We generally recommend UNIX timestamp for these purposes.

Users and randomized groups

DimensionTypeDescriptionUse Case
User IDtextThe unique ID assigned to a user. Typically, this matches the ID used in your company’s database.
Note: User ID defaults to device ID if not provided—see developer docs for accepted device IDs per platform.
Target user where User ID is 12345 to send only that user a push notification.
User bucketnumberA bucket from 0-999 to choose random groups of users based on user ID.
Note: User buckets create random, mutually exclusive groups of users. User buckets are persistent, meaning a user will stay in the same bucket throughout their experience with your app.
Target users where User bucket is between 0 and 249 to consistently select a 25% sample group for an experiment.