Autoprompts allow you to actively engage users by automatically popping up the Satisfaction and SmartVote widgets when certain conditions are met.
- To ensure that users don’t get autoprompted too often, autoprompts will only work if you have identified the user with an email or id using the
identifymethod (learn more).
- Select which Autoprompts you want enabled via your account’s Widgets settings.
- Call the
autopromptmethod when you want the user to get autoprompted. When this method is called, it checks to see if any of the enabled conditions are met, verifies that the identified user should be prompted at this time, and then prompts the user for Satisfaction or SmartVote.
If you’ve added the default trigger to your page, the autoprompt will appear as a popover targeted to that trigger. If there is no default trigger, then autoprompts will appear as a toast since they do not have a default object to anchor themselves to. However, you can specify your own target HTML element:
1 2 3 4
Alternatively, you can specify a particular HTML element the autoprompt will target as a popover by adding the
data-uv-autoprompt attribute to the element:
Note: If multiple
data-uv-autoprompt attributes are found on the page, the last one will be used.
If you use ajax to update your website rather than page loads, you can call the
autoprompt method multiple times. Each time it is called, it checks if there are any new server-side prompts to display. If a new one is found, it will be displayed to the user.
Some examples include prompting after a simple ajax login, prompting after the user scrolls to the bottom of the page, or waiting 10 seconds after the page loads to prompt them.