Triggers determine when your survey would be displayed to your visitors. You can either use the option Select from this list of commonly used triggers to show your survey to select a trigger type from the list of most commonly used triggers for the survey or define a custom trigger by using the option Create advanced trigger conditions show your survey. To learn how to configure advanced triggers, refer to How to Add Triggers for On-page Surveys.
Based on the trigger you specify, VWO displays the survey when your visitor fulfills the trigger conditions. The triggers can be time spent on a page, pages in a session, the number of pages browsed, and so on.
Adding a Simple Trigger
Here, you can select the trigger from a list of VWO provided triggers.
Procedure
- Login to your VWO Account.
- Go to INSIGHTS > Surveys.
- On the Surveys dashboard, click CREATE to create a Survey.
- On the URL page, specify the URL where you want your Survey to appear. To know more about setting ups the URL for your Survey, refer to Creating a Survey in VWO.
- Click Next.
- On the TRIGGERS page, select a trigger type from the Select from this list of commonly used triggers to show your survey section.
- Once you have selected the trigger type, specify its value from the corresponding dropdown.
Adding a Custom Trigger
You can also combine multiple trigger conditions to create a complex trigger condition for the campaign. Also, you can define your own custom condition by writing additional code.
Procedure
- Login to your VWO Account.
- Go to INSIGHTS > Surveys.
- On the Surveys dashboard, click CREATE to create a Survey.
- On the URL page, specify the URL where you want your Survey to appear. To know more about setting ups the URL for your Survey, refer to Creating a Survey in VWO.
- Click Next.
- On the TRIGGERS page, go to Create advanced trigger conditions to show your survey section.
- From the trigger type dropdown, select a type and enter its value in the corresponding field(s).
Some Commonly Used Triggers
- Time spent on a page is more than x seconds
Selecting this trigger pops up the survey when a visitor spends “x” seconds on a single page. For example, if you have defined the trigger as 10 seconds, the survey appears when the visitor spends 10 seconds on a page.
NOTE: If the time spent on a page trigger is set to 0, then the survey displays the moment a page loads. - Time spent in a session is more than x seconds
Selecting this trigger pops up the survey when a visitor spends “x” seconds in a session. A VWO session is typically defined as the visitor's duration on a website with the VWO SmartCode installed before closing the browser. For example, consider that your test URL is www.example.com/page1, and you set the session trigger to >60 seconds. Now, if a visitor lands on page1, then browses to page2, and finally comes back to page 1 again, the time spent on these pages is considered toward the final count of time spent in a session. So even the time spent by a visitor on a page that is not part of the test URL is counted as the time spent in a session.
NOTE: A visitor may visit multiple pages in a single session. - Number of pages viewed in a session is equal to
Displays the survey after a visitor has browsed the specified number of pages in a single session. A VWO session is typically defined as the visitor's duration on a website with the VWO SmartCode installed before closing the browser. For example, consider that the trigger URL is www.example.com/page1, and you have set the trigger to >3 pages in a session. If a visitor goes to page1, then page2, and finally page 1 again, the count of pages in a session is 2, not 3. Currently, it counts all the pages on which any survey is running.
NOTE: VWO considers page refresh as a new page view. There are three different page refresh scenarios considered for this trigger. All the pages in the session were on the same page (the same page refreshed multiple times), the pages in the session were different (different pages browsed), and the pages were a combination of the two (single page refresh as well as browsing of different pages). - When a visitor is trying to close the page
The exit trigger is only executed if the cursor has moved out of the viewport with more than the predefined threshold speed, then it considers that the user is exiting the page. This means that the survey may not appear in a case where you move the cursor very slowly towards the close button. - If the visitor scrolls more than “X” pixels from the top
Displays the survey when visitors scroll a certain number of pixels on a page. For example, you can set the trigger when the reader has reached a certain section of your webpage.
NOTE: When this trigger is selected in Advanced Triggers, a few more options are available. A user can choose either pixel scrolled or the percentage page height scrolled from the page's top or bottom. The percentage page height scrolled works for a fixed height page because the height is static and doesn’t change. But for dynamic pages where the height is not constant, it is recommended to use pixels scrolled because this would be more accurate and reliable.
For example, An e-commerce product search page with infinite scrolling. Also, the reference point for the scroll can be either the top or bottom of the page.
Advanced Triggers
In the advanced triggers, you can define multiple conditions for your survey to trigger. By default, a list of commonly used triggers is displayed with limited but most common options selected. If you want more control over the trigger conditions and/or want to set up multiple trigger conditions, choose the options present in the Create Advanced Trigger Conditions To Show Your Survey section. In addition to the simple triggers, the following triggers are available in the advanced triggers section:
- Click on an element
Displays the survey when visitors click a predefined element on a page. If the element happens to be a hyperlink that redirects to another page, the survey will display only if the redirected-to page is also part of the test. - Custom Trigger
Displays the survey when the executeTrigger() function is executed. Users can add their own custom code and call the executeTrigger() function. This way, the custom trigger condition is fulfilled, and the survey is displayed. - When a Test variation is shown
Displays the survey when a specific variation is shown. On selecting this trigger, you need to specify the Test ID and Variation ID.