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. 

Graphical user interface, application

Description automatically generated

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 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 Product Fruits is being passed, and therefore what 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 administration, navigate to the App Users section and open User Segments. Here, you can create your first segment:

Start adding rules by clicking  +  Add Condition. In this example, the user must have finished the tour "My First Tour" and more rules and be added, such as if their device is mobile or desktop or if the user has completed a survey:

This 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. Keep in mind that 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. 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. 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. This 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.