Segmentation

When setting up content, segmentation allows you to target specific groups of users based on criteria that are important to your application. Whether you want to show content to certain users or exclude others. Let's break it down to make sure everything is clear.

Locating Information About Your Users

Before you can start segmenting content, you need to know which user properties are available to segment with. These properties depend on what data is being passed from your application to Product Fruits. You can review which properties your users consist of by checking the Tracked Users section of Product Fruits. Clicking on the detail button for a particular user will display what information is being passed to Product Fruits, and therefore what information it can segment from.

For example, the custom rule below would set the tour to begin only for users that both belong to the role admin and have finished the Tour1 tour.

If you need to add more information to your users, and for more details on how user information is sent to Product Fruits and how to set it up correctly, refer to our Identifying Users article.

Understanding the Difference Between User Segments and Targeting

There are two key ways to apply segmentation in Product Fruits: User Segments and Targeting. User Segments are reusable, while Targeting is used for one-time content assignments. For example, if you have a segment for "paid users" but only want a specific tour to target users who completed the "Orientation" tour, you would apply the segment in the targeting settings for that tour.

User Segments

These are saved collections of rules that you can create once and use across multiple pieces of content. When creating a user segment, you define conditions that match a group of users. For example, you might create a segment that targets users who have completed the Intro Tour and have been active for more than 30 days. This segment can then be applied to any future content (like tours or surveys).

Targeting

Targeting is more immediate and specific. When you create a piece of content, you can apply a segment in the Targeting menu to either include or exclude certain users. If you want to segment a single piece of content, such as a one-time tour or survey, you would use targeting rules. These rules can be based on saved segments or custom criteria like user role or signup date.

URL Filtering

URL Filtering is available in the Targeting section for some content, such as:

  • Elvin widget
  • Checklists
  • Announcements
  • Surveys
  • Feedback widget
  • legacy Copilot
  • Life Ring Button (Legacy)

By specifying a list of URLs, you can either restrict content to display only on certain pages, or hide it from specific ones.

When configuring URL filtering, you choose one of two modes:

  • Display only on these URLs: the content will be visible exclusively on the URLs you list. It will not appear anywhere else on your site.
  • Hide on these URLs: the content will appear everywhere except the URLs you specify.

Many URLs contain segments that change depending on the user or context. Rather than listing every possible variation, you can use the [dynamic] placeholder to match these variable parts.

Creating Segments for Targeting

To create a user segment, go to More > End users in the Product Fruits admin panel and navigate to User Segments. Click on the Create Segment button to start adding rules.

Click Edit rules and select what you want Product Fruits to evaluate. Depending on where you open the editor, rules can be based on information such as:

  • User properties, including username, email, role, name, signup date, and custom properties
  • Device or environment information
  • Custom events
  • A user’s interaction with Product Fruits content, such as completing a tour
  • An existing user segment

After choosing a property, select an operator and provide the value that the rule should match.

The first rule always begins with If because it establishes the first condition that Product Fruits evaluates.

Adding Nested Conditions to a Rule

A single rule can contain multiple nested conditions. Click the arrow on the right side of a rule to open it, then click Add condition.

Use subconditions when several criteria belong together as one logical group. Connect them using:

  • AND when every condition in the rule must be satisfied.
  • OR when any condition in the rule can be satisfied.

For example, one rule could match users whose role is either “admin” or “owner”:

If the user’s role equals “admin”
OR the user’s role equals “owner”

Nesting keeps related conditions together and makes more complex targeting logic easier to understand.

Adding and Combining Multiple Rules

To create another top-level rule, return to the main rules editor and click Add rule.

For every rule after the first, use the dropdown at the beginning of the row to define its relationship with the preceding rules:

  • AND requires the user to match this rule as well.
  • OR allows the user to match this rule as an alternative.

For example, you could combine a nested role rule with another requirement:

If the user’s role equals “admin” OR “owner”
AND the user completed the “Welcome Tour”
AND the user signed up more than three days ago

In this example, the user must have one of the specified roles and meet both of the additional requirements.

Use Add condition for criteria that belong inside the same nested rule. Use Add rule when you want to introduce another top-level requirement or alternative.

Resolving Conflicting Rules

The editor displays a warning when it detects conditions that cannot be satisfied together.

For example:

If Username equals johan.leibniz
AND Username equals another.user

A username is a single-value property, so it cannot equal two different values simultaneously. Consequently, no user can match these conditions.

To resolve the conflict:

  • Change AND to OR if either value should be accepted.
  • Correct a value if one of the conditions contains a mistake.
  • Delete the unnecessary condition if only one value should be accepted.
  • Move related alternatives into the same nested rule when this makes the logic clearer.

Similar conflicts can occur with other single-value properties, such as email, role, language, or device type. Review any warning before saving, even when an empty result is intentional.

Editing, Duplicating, and Deleting Rules

The icons on each rule provide shortcuts for managing it:

  • Click the arrow to open the rule, edit its definition, or add nested conditions.
  • Click the duplicate icon to create a copy of the rule.
  • Click the delete icon to remove the entire rule.

When duplicating a rule, update its values and check whether it should be connected using AND or OR.

Checking Matching Users

Open the Users tab to see which currently tracked users match the configured rules. This provides an initial view of the segment’s size before you apply it to content.

The results can change as new users are tracked, user properties are updated, or users complete events and Product Fruits content.

If no users match, check that:

  • Every rule and subcondition has a property, operator, and value.
  • Values use the same spelling and capitalization as the data sent to Product Fruits.
  • Custom property names match those used in your Product Fruits installation.
  • The selected AND and OR relationships represent the intended logic.
  • Nested conditions have been added to the correct rule.
  • The required user properties or events are being sent to Product Fruits.

You can inspect the information recorded for an individual user under More > End users > Tracked Users.

Segmentation by User Properties

User-based segmentation lets you target or exclude content based on attributes of the logged-in user. Below is a breakdown of each available property and the operators you can use with it.

Text Properties

The following properties all share the same set of operators, since they are all text-based fields:

  • Username
  • Email
  • Role
  • First Name
  • Last Name

Available operators:

Operator

What it does

Equals / Doesn't equal

Matches (or excludes) an exact value

Is empty / Is not empty

Checks whether the field has any value at all

Contains / Doesn't contain

Checks whether the field includes a particular phrase

Matches regex / Doesn't match regex

Uses a regular expression pattern for advanced matching

When to use regex: Regex operators are useful when your matching logic is too complex for a simple contains check, for example, matching emails from multiple domains at once or enforcing a specific username format.

Date Property - Sign Up At

The Sign Up At property works differently from the text fields above. It operates on a date value, so its operators are time-aware. It is the signup date supplied by your application for the current Product Fruits user identity; Product Fruits does not independently distinguish an original signup from a later account recreation.

Fixed date operators: provide a specific date in YYYY-MM-DD format:

Operator

What it does

Equals / Doesn't equal

Matches users who signed up on (or not on) an exact date

Is empty / Is not empty

Checks whether a sign-up date has been recorded

Is larger than

Signed up after the specified date

Is less than

Signed up before the specified date

Is larger than or equals

Signed up on or after the specified date

Is less than or equals

Signed up on or before the specified date

Relative date operators: provide a number of days instead of a fixed date. These are useful for building rules that stay current over time without needing to be manually updated:

Operator

What it does

Is at least

The sign-up date was at least N days ago

Was no more than

The sign-up date was within the last N days

Will be in at least

The sign-up date is at least N days in the future

Will be in no more than

The sign-up date is within the next N days

Segmentation by Event Properties

You can also segment users based on specific events they trigger within your app. For example, you could create a segment for users who triggered the “Completed Registration” event. Additionally, you can refine this segmentation by time, such as targeting users who completed the event in the last 7 days or within a specific time frame.

Event-based segmentation is powerful because it allows you to create segments based on user actions, not just static properties.

Adding Segments to Content

Once you’ve created your segments, you can apply them to Product Fruits content directly from the Targeting menu. Here, you can either include or exclude the segment from specific tours, hints, or surveys. If you want to make sure your content is only shown to a specific group, this is where you’ll apply your saved segments or custom rules.