Search…

Time-Delayed Survey Popup

Here's a short guide on how to automatically pop up a survey on your website after a specified time:

  1. Get Your Popup Embed Code:

Navigate to your survey -> locate "Sharing" section -> select "Popup embed" -> click "copy Code".

  1. Add the JavaScript Snippet:

Once you have the embed code, you can add the following JavaScript snippet to your website. Please add this under your Popup embed code. Make sure to replace WAIT_SECONDS with desired time in seconds for the survey to appear.

<script>
  const WAIT_SECONDS = 5;

  window.addEventListener('load', () => {
    const msBtn = document.querySelector('[id^="metasurvey-button"]');

    if (msBtn) {
      // msBtn.style.display = "none"; // Hide the button
      setTimeout(() => msBtn.click(), WAIT_SECONDS * 1000);
    }
  });
</script>

You can also uncomment // msBtn.style.display = "none"; by removing the two slashes // at the beginning to hide the call-to-action button.

  1. Test on Your Website:

Finally, test your website to ensure that the survey popup appears after the specified time.

Create your survey today

Create your survey today

Create your survey today