✍️ Prefill Name and Email Fields:
To make it easier for users to submit feedback and to ensure that you can identify and respond to feedback from specific users, you can prefill the name and email fields in the feedback form.
To do this, you can use the Userback.email
and Userback.name
JavaScript methods. In the code example provided, the Userback.email
property is set to "[email protected]" and the Userback.name
property is set to "John Doe".
<script>
// Set the user's email
Userback.email = "[email protected]";
// Set the user's name
Userback.name = "John Doe";
</script>
To output the user's email and name dynamically from your own database, you can replace the hard-coded values in the code with the appropriate database calls. This will ensure that the feedback form is pre-filled with the user's actual email and name.
The exact implementation of this will depend on your specific application and database setup, so we encourage you to work with your development team to determine the best approach.
👆 Bind Feedback Widget to a Button or Link:
This feature allows you to improve user experience by allowing users to easily provide feedback with a button or link that triggers the Userback feedback widget. By binding the feedback widget to a button or link, you can make it easier for users to access the feedback form, which can increase the likelihood of them providing feedback.
Technical description: You can bind the feedback widget to a button or link using JavaScript. For example, you can use the Userback.open() method to open the feedback form when a button or link is clicked. You can also customize the appearance of the button or link using CSS.
✍️ Prefill Name and Email Fields:
This feature allows you to save users time by prefilling specific fields in the Userback feedback forms like name and email. By prefilling these fields, you can make it easier for users to provide feedback, which can increase the likelihood of them doing so.
Technical description: You can set the default email and name using the Userback.email and Userback.name JavaScript methods. These values will be auto-filled in the feedback form. For example, Userback.email = "[email protected]";
🌐 Dynamic Language Switching:
This feature allows you to enhance the user experience for people from all over the world by switching the language of the feedback widget on the fly. By supporting multiple languages, you can make it easier for users to provide feedback in their native language, which can increase the likelihood of them doing so.
Technical description: You can set the language of the feedback widget using the Userback.widget_settings.language JavaScript method. For example, Userback.widget_settings = { language: "fr" } will switch the language of the feedback widget to French.
📕 Attach Custom Data to Feedback:
This feature allows you to gain more insights into user feedback by attaching custom data, like product version, user agent or app related data. By attaching custom data, you can better understand the context of user feedback, which can help you make better product decisions.
Technical description: You can attach custom data to feedback using the Userback.custom_data JavaScript method. This method accepts an object with key-value pairs of custom data. For example, Userback.custom_data = { account_id: 7, name: "John" } will attach the account ID and name to the feedback.
Note: Use custom_data when the Javascript API hasn't been added. Otherwise, use setData().