Segments are subgroups within your larger userbase. You can create segments in virtually every section of Leanplum, including in Messages, Campaigns, the Users page, and A/B Tests. These segments can make up the Target audience for a test or message.
You can also use segments as Filters in the Users and Analytics Dashboards to view metrics and information for a specific group of users.
No matter where you are in Leanplum, the process of creating a target segment or filter is the same:
- Select a segment. Click the All Users or Add Segment dropdown to show the segment options available. Choose one of the segment criteria to add it to your target or filter.
See Segment and target criteria options for a full list of segment options and examples.
- 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.
- 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.
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.
- Save your new segment for later use. Click the save dropdown if you want to name and save the target phrase you just created.
See Saved segments* for more on saving segments and advanced targeting.
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.
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:
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.