This feature allows you to enhance your in-app popups and widgets with personalized content, making your user interactions more engaging and tailored. You can now use variables in your widget titles, descriptions, and all popup content!
How to Use Variables
Syntax
To use a variable, employ the following syntax:
{variable_name | fallback}
The variable_name
is the placeholder that will be replaced with the actual user data, and fallback
is the default text that will be displayed if the user data is not available.
Example:
Hi {user_first_name | there}
This will display as "Hi John" if the user's first name is John. If the user's first name is not available, it will display as "Hi there".
Where to Use Variables
You can use variables in any input or text field where you see this icon "{}". This includes:
Widget title
Widget description
All types of popups
Supported Variables
Currently, the following variables are supported:
user_name
: The username of the user.user_full_name
: The full name of the user.user_first_name
: The first name of the user.user_email
: The email address of the user.
Step-by-Step Guide
Identify the Placement: Look for the "{}" icon in the input or text fields where you want to personalize the content.
Insert the Variable: Use the syntax
{ variable_name | fallback }
to insert the variable.Preview Your Content: Ensure that your personalized content is displaying correctly. Check both the variable and fallback text to ensure proper functionality.
Tips
Fallback Text: Always include a meaningful fallback text to ensure your messages make sense even if the user data is not available.
Testing: Test your variables to see how they render with actual user data. This helps in identifying any issues with the placeholders or fallback text.