Adjust the time between visitors entering your website and showing the pop-up

Adjust the time between visitors entering your website and showing the pop-up


You can delay the pop-up invitation Task Analytics uses to invite visitors to participate. Doing so allows you to invite visitors after a defined number of seconds. Follow the instructions below to adjust your survey code.
Adding a time delay to the pop-up invitation

Step 1
Copy & paste the code below into your preferred code editor or notepad. You can also download and open the zip-file at the bottom of this article.  
  1. <script>
  2. (function() {
  3.   var delayMillis = 5000;
  4.   var delay = RegExp('_tmc=(.*?)(;|$)').test(document["cookie"]) ? 0 : delayMillis;
  5.   var loadTA = function() {
  6.     // enter code here
  7.   }
  8.   setTimeout(loadTA, delay);
  9. })();
  10. </script>

Step 2
Log in to Task Analytics and find your survey code. Copy the code between the <script> and </script>. 
Copy your survey code (between the <script></script>)
Step 3
Replace the existing survey code, line 6 of the script shown in step 1 of this article, with your own survey code.

Step 4
Adjust the delay by changing the number of milliseconds in line 3. In this example, the delay is set to 5000 milliseconds (5 seconds).

Step 5
Publish this code on your website.