The Use Case:
Let's assume, in your web platform, your customers differ from each other based on product plan they use as users having freemium plan and premium plan.
And you've just released two different new features each for a different plan, and you want to promote these features with UserGuiding guides.
That's why, you designed two custom guides and now, you need to direct each of them, separately, to the correct user segment having the following custom attribute.
1. Creating the Custom Attribute
In the above image, ‘customer_type’ is the key field in your event layer. It is the identifier of the custom attribute.
Text is our Data Format. Since the value of your user segment is in text form.
Data source is UserGuiding. So, the code snippet (container JS code) will check the data you've set through 'userGuiding.track’ method.
If you click on SAVE, you will see the following code snippet.
Copy the code below and insert it into your application (A developer can decide on the snippet's location).
6. The code should change with respect to the user type.
Expected code tracking snippet if the customer's plan type is freemium:
And, if the customer's plan type is premium:
2. Creating the Segments with the custom attribute: "customer_type"
Go back to segmentation page and create two different user segments.
Select the customer_type as the segment property.
Set their conditions with a rule and a value (user property).
Segment of users whose plan type is freemium:
Segment of users whose plan type is premium:
3. Designating custom segments to their appropriate guide
Go to each guide's settings page.
Click on Custom Segmentation to select the suitable user segment from the opening dropdown menu.
After matching each guide with their tailored segment, SAVE the final setting of the guide.
Finally, click on green Publish Changes on the upper left of the page, to update their live version too, by updating the container code.