Advice and answers from the UserGuiding Team
Users
Engagement
Settings
Survey
Learn how to utilize the UserGuiding's JavaScript API survey methods

Launch a Survey

Manually triggers a specific Survey by its ID. If a survey ID is not provided, this method will trigger any available survey that is targeted to the current page/user (if one is waiting to be shown). Only one survey is shown at a time; if another survey is active, it will be closed.


Type Definition

type launchSurvey = (surveyId: number) => void


Example:

Launches a specific survey with ID 555


userGuiding.launchSurvey(555);


Triggers any pending survey (if one exists for this user/page)


userGuiding.launchSurvey();


Hide the Survey

Dismisses the currently active Survey. 


Type Definition

type hideSurvey = () => void


Example:

Hides the active survey


userGuiding.hideSurvey();
Did this answer your question?