JavaScript API
Userlove JavaScript supports the following events & methods as part of its API
Examples
Identify the current user
Track event
Track event with custom data
Launch Product Tour
This function allows you to start a product tour anytime without verifying any trigger or segment conditions. You only need to pass the unique tour ID as a single argument to the function.
Hide Product Tour
You can use this function to dismiss a product tour or trigger the completed event. If the product tour is already completed, the function will fire the completed event. Otherwise, it will dismiss the product tour. You need to pass the unique Tour ID of that product tour as a single argument to this function.
Launch Survey
This function can be used to launch a survey at any time, without checking the trigger or segment conditions. You only need to provide the survey ID, which you can copy from the survey list.
Hide Survey
You can use this function to trigger a dismiss or completed event for a survey. When the function is called, if the survey is already completed and displaying a thank you screen, it will fire the completed event. In any other case, it will dismiss the survey. You only need to pass the unique survey ID as a single argument to the function.
Launch Onboarding Checklist
This function can be used to start a checklist at any time, regardless of any triggers or segment conditions. You just need to provide the unique checklist ID as a single parameter.
Hide Onboarding Checklist
This function triggers a dismiss event or a completed event for a checklist. If the checklist is already completed or displaying a congratulatory screen, calling this function will fire the completed event. Otherwise, it will dismiss the checklist. It required a single argument, which is the unique ID of the checklist.
Last updated