User segmentation is a powerful feature in Faqprime that allows you to group users based on shared characteristics. These characteristics could be language preferences, product version, geographical region, user persona, and more. As users update and match these characteristics, they are automatically added to the relevant segment.
Creating a segment in Faqprime:
- Navigate to the admin section.
- Click on ‘Preferences’.
- Locate ‘Segment Configuration’.
- Enter the desired segments, separated by a comma.
Note: The default segment is ‘all’, which includes all users.
Using the segment in an in-app messaging campaign:
- Go to Popup Manager.
- Click on ‘My Campaigns’ or create a new campaign by duplicating a template.
- Enter the segment list (choose from the auto-suggestion).
- Click on ‘Save and Next’.
Setting up targeted in-app message for a user segment via JavaScript API:
Faqprime uses the faqbotGetUserSegment() function to determine which messages should be displayed to the current user. If this function is defined in your code, Faqprime will call it to return the segment (a string or an array) for the current user. If this function is not defined, the current user segment defaults to ‘all’.
Here’s an example of how you might define this function:
function faqbotGetUserSegment() {
return "even";
}
function faqbotGetUserSegment() {
return ["even", "all"];
}