Segmentation
When setting up segmentation for tours and announcements, it is important to keep different possibilities in mind. For example, depending on which properties you pass to Product Fruits, you can segment by username, sign up date, and even whether the user is a paying customer or on a free trial. This means you can show content to specific users if you so choose.
Locating information about yourself
Perhaps you only want a tour appearing for yourself (and not your users) for testing purposes. For this, you'll need to know how to look up the information for your user account. A common point of confusion is when the username in Product Fruits is different from the username on your website/application.
There are two different ways to locate properties to segment with. To find your user information, you can use the Live Debugger. Once it is launched, switch to the User information tab.
After you've obtained the username value (Dv9r4yVV in the example above), you can go to your tour settings and create the following custom rule:
Once this is saved, you can publish the tour. The tour will now appear exclusively for you. If you would like to see the tour again, you can use the Admin tools feature (shown in the screenshot below) to either restart the tour for all users, or for your username alone. Since the tour is only segmented for one user, both buttons will have the same effect.
Locating information about your users
Of course, it's also possible to segment user properties. It all depends on what information is being passed to Product Fruits from your application. 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 "paid" and have finished the "Orientation" tour.
How to Create a Segment
You can also create a segment to be used later and combined with other custom rules. In the Product Fruits administration, navigate to the App Users section (More --> Users) and open User Segments. Here, you can create your first segment by clicking on the Create segment button:
Start adding rules by clicking + Add Condition. In this example, the user must have finished or skipped the tour "My First Tour". More rules can be added in the dropdown menu, such as if their device is mobile or desktop or if the user has completed a survey:
The + Add Condition dropdown is also where you can add custom and built-in properties sent to Product Fruits, such as a role or signup date:
In this example, the segment rules state that the first tour must be finished or skipped, the user's role must be 'test', and they must have signed up at least 3 days prior.
Note: All rules in a segment must be either 'AND' or 'OR'. To combine 'AND' and 'OR' operators, you can combine segments with custom rules.
Testing Rules on a Username
Need to see if a segment matches a specific user? You can test the rules of the segment on a username right in the segment settings. As soon as you have saved a name for your segment, the "test rules on a username" dropdown will appear.
Keep in mind that ALL of the rules must match if the operator is set to 'AND' but only one needs to match if they are set to 'OR':
The result Cannot be tested will be displayed when it is not a property being matched, as the rule tester is for testing user properties. If you have any Product Fruits content (e.g. tours, surveys, checklists) within your segmentation rules, you will see this message. You can check if a user has interacted with content in Tracked Users instead.
Add a Segment to Targeting
Add the segment to Product Fruits content in the Targeting menu (found directly on the content e.g. tour, hint, survey, etc that you have created). You can choose if the content will be shown to the segment, or exclude it.
Combining AND/OR rules in segmentation
Combining "and" and "or" statements when segmenting content on your website can help you create more precise and flexible targeting criteria for your audience, allowing for greater control when tailoring your content to different audience segments. This can be done by using a combination of saved segments and custom rules.
If you haven't already, create a segment to save for later. The screenshot below will be an example test segment to show only content to your developers and test users:
Once the segment is saved, you can then combine it with AND rules to further specify the conditions in which the Product Fruits content will be displayed:
With this combination of segmentation and custom rules, we are able to display this tour either to our test user or test/developer roles, and only when the user is on desktop and the Welcome Tour is finished or skipped.
Segmentation by Event Properties
Segmentation by Event Properties allows you to create segments based on whether a specific event has occurred or not. You can choose to target users who have triggered a particular event or those who haven't. Additionally, you can refine the segmentation by setting time-based conditions, such as selecting users who triggered the event within the last X days, hours, or minutes, or those who triggered it at least X time ago. This enables you to segment users based on both the occurrence of events and the timing of those events.