Leanplum's user guides and developer documentation.

Leanplum Documentation

Leanplum's user guides, SDK setup, API docs, and more resources are here to help you get the most out of A/B testing, Campaigns, Messaging, and Analytics.

Building audiences and targets

Narrow down your target audience with segments

Audiences are subgroups within your larger userbase. You can view and manage all audiences available in your Leanplum dashboard on the Audiences page. Learn more about audience management at Leanplum: https://docs.leanplum.com/docs/audience-management

You can also use segmentation to filter users in the Analytics Dashboards to view metrics and information for a specific group of users.

Create an audience

The recommended way to create audiences is from the Audiences page. Learn more: https://docs.leanplum.com/docs/building-an-audience

You can also create audiences in-line as you are creating your Campaigns, Messages, A/B tests or Analytics reports.

  1. To start, click on "All Users" or "Add Segment" dropdown to show the segmentation rules available. Choose one of the segmentation criteria to add it to your target or filter.

See Segment and target criteria options for a full list of segment options and examples.

  1. Choose an operator. Operators modify how each user is evaluated against a segment. For example, you could modify a segment option like “App version” with an operator like “is greater than”, “is less than”, "is any", or “is at most” a certain number.

Click the operator inside the target phrase for more options.


Different types of segment criteria (string, datetime, number, etc.) have different operator options. See Segment operators for more details.

  1. Enter a value. Many operators require a value so that Leanplum has something to compare your users to. Click the value in the target phrase to edit it. For example, the operator “is less than” would require a number value to complete the Target phrase (e.g. "Occurrences of Add to Cart is less than 3").

You can also add more than one value by clicking the value, then clicking the + button. Likewise, you can remove a value by clicking the - button.

  1. Add additional fields to a segment with AND/OR.
    Click the + button in the target phrase, then repeat the steps above to create a segment with multiple criteria. Click AND to choose either an AND or OR operator between each segment.
  • AND will target users who fit both of your selected segment requirements. For example, the target phrase “City is Los Angeles” AND “Device model is iPhone” would only include users who are in Los Angeles AND use an iPhone.
  • OR will target users who fit in either (or both) of the segments you chose. For example, the phrase “City is Los Angeles” OR “Device model is iPhone” would send to all users in Los Angeles, regardless of their device type, and to all iPhone users, regardless of their location.


Magnet button (stickiness)

Stickiness determines what happens when a user leaves the target group after qualifying for an A/B test or message. For example, a user might start in our target group of San Francisco users, then fly to New York for a week.

See Stickiness and targets for more.

Target all except certain users

You can also create segments of your target audience to exclude them from certain campaigns. This prevents certain users from being adversely affected by a message or experience change. There are two ways to achieve this goal:

Negative Operators

You can use operators like “is not,” and “does not contain” to exclude some segments from your target audience. For example, you could set your target phrase as “Device model is not iPhone 6” to exclude iPhone 6 users from your audience. See Segment operators for more.

Not Saved Segments

For segment options that don’t have the “is not” operator, or more complex segment options, you can use the Not saved segment feature, which targets all the users who aren’t in the Saved segment you create.

Just click Not saved segment from the All Users dropdown and choose the segment you want to exclude from the campaign, message, or test.

For more, see Saved segments.

Updated 3 months ago

Building audiences and targets

Narrow down your target audience with segments

Suggested Edits are limited on API Reference Pages

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