How to Display the Survey With the API
You can call the following function to display the survey manually:
showSurvey: Show a specific survey and optionally ignore its targeting options.
stopSurvey: Hide any current running survey.
Preventing the survey from automatically loading itself.
Showing the survey at a particular event for more responses.
Step 1: Disable the automatic displaying of the survey by adding
Below the variable
Step 2: Make the following API call to display a survey.
Calling the “showSurvey” function will work according to your targeting options except for the URL. If you want to display the survey regardless of targeting options and if the user has already taken the survey, you can pass the third parameter “true” like this:
Step 3: To locate the Survey ID,
Navigate to the EDIT or TARGETING tab.
Copy the survey ID from the URL and replace “SURVEY ID” in the code with the number.