Use Javascript trigger if you want to trigger the survey on a specific action taken by the user on your website or web application.

Suppose a user just signed up to your platform and you want to show them the survey regarding the signup experience, in that case, you can just use this trigger to start the survey.

How to use it?

NOTE: Before starting with this section, you must have basic knowledge of the Javascript Language.

Step 1: Select the Javascript trigger from the targeting section.

Step 2: Enter an event name you would like to use as your trigger, only alphanumeric characters (a-z, A-Z, 0-9), underscores (_), and dashes (-) can be used in the trigger name. This field cannot be left blank.

Note: If a Javascript trigger is present on a page, it will cause the survey to show regardless of any other rules present.

Step 3: Click Done.

Step 4: Add trigger code to the website

In the example above, we’ve created a trigger called user_logs_in. Next, you will need to add the trigger code to your website:

window.surveysensum.startSurvey(‘user_logs_in’);

Did this answer your question?