What are some methods for postponing a SurveyMonkey survey prompt?

Seeking feedback on a new site launch in beta mode (full launch scheduled for March 28). We want to give users time to explore the site before showing a pop-up after 10 seconds. As I am new to coding JavaScript, any assistance would be greatly appreciated.

I came across a similar question with answers that seemed relevant to my situation: delayed pop-up code. Despite this, I am having trouble implementing the code on my site.

The pop-up is integrated using SurveyMonkey's JavaScript without any associated HTML or CSS.

(function(t,e,s,o){var n,c,l;t.SMCX=t.SMCX||[],e.getElementById(o)||(n=e.getElementsByTagName(s),c=n[n.length-1],l=e.createElement(s),l.type="text/javascript",l.async=!0,l.id=o,l.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd8fe_2Bhm5gFnGqBOI61Z1zZLxwDFd6OcUAaoSp03T3t6v.js"].join(""),c.parentNode.insertBefore(l,c))})(window,document,"script","smcx-sdk");

This is the modified code I currently have based on one of the responses from the previous post.

function OpenSurvey(t,e,s,o){};
        window.setTimeout(function(){ OpenSurvey(window,document,"script","smcx-sdk"); }, 10000);

Answer №1

Dealing with a similar problem today, I was able to resolve it by using the following code snippet. Feel free to give it a try:

setTimeout(function(){ OpenSurvey(window,document,"script","smcx-sdk"); }, 60000);

function OpenSurvey(t,e,s,o){var n,a,c;t.SMCX=t.SMCX||[],e.getElementById(o)||(n=e.getElementsByTagName(s),a=n[n.length-1],c=e.createElement(s),c.type="text/javascript",c.async=!0,c.id=o,c.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/xxxxxxx.js"].join(""),a.parentNode.insertBefore(c,a))}

Answer №2

I encountered the same frustrating issue and spent hours trying to troubleshoot it by tweaking the code snippet provided by SurveyMonkey. Despite reaching out to their support team for help, all they could offer was a new snippet with some additional handlers - but it didn't solve the problem. Just when I was on the verge of calling WIX for assistance, I stumbled upon a suggestion while navigating through their website.

To my relief, I found a tutorial on embedding third-party code that made the process incredibly straightforward. No need to manually insert the snippet into the page code - there's a specific section in the Advanced Settings of your site Dashboard where you can easily add it. If you're unsure how to access this, simply click on your site's thumbnail on the WIX dashboard, look for Settings in the right rail, and select Advanced Settings. You can find detailed instructions from WIX on working with third-party code here.

Best of luck with implementing this solution, and I hope it resolves your issue as it did mine! The trickiest part for me was distinguishing between different dashboards until I navigated to the correct settings page.

Sincerely, BrZrKr

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm looking for a way to track the progress of an ajax call. Specifically, I want to know how I

I am currently working on an AJAX call that executes a lengthy PHP script producing 20 different results. I aim to display the progress of each step within the script, such as 1/20 complete, 2/20 complete, 3/20 complete. Last updated on 29-12-2015 at 03:1 ...

Can you please explain the purpose of the mysterious JavaScript function f => f?

Currently, I am utilizing a third-party library that utilizes a function with functions as arguments. During my conditional checks, I determine whether to add a particular function as a parameter or not. However, providing null in these cases results in er ...

What is the best way to transfer JSON data to a different controller in AngularJS?

Hello, I'm still learning AngularJS and facing an issue with the following code snippet. app.config(function($routeProvider) { $routeProvider .when('/', { templateUrl: "partials/home.html", controller: "mainControlle ...

Accessing composable variables in Vue 3 without having to redefine refs from within a function

Currently, I am implementing a parent companyList component along with a reusable Table component and an useFetch composable in vue 3.2. Prior to integrating the Table component, my code looked like this: companyList <script setup> import { com ...

Monitor the completion status of all Ajax requests using only JavaScript

I am aware of the ajaxStop method in jQuery. $(document).ajaxStop(function() { //Do something }); If jQuery is not available, is there a way to achieve this with pure JavaScript instead? If so, could you please provide an example? Thanks ...

Adjusting element position while scrolling

Objective The goal is to have the page navigation display lower on the page by default. This will provide a cleaner layout as shown in the image below. Context An interactive element for navigation was implemented utilizing Headroom.js. This library d ...

Encountering issues with integrating NPM package into Meteor.js

Having installed both the meteor-npm package and the crypto npm package, I encountered some issues while using it in Meteor. npm: updating npm dependencies -- crypto Despite seeing this output in the console, when trying to use the npm package on the ser ...

How to utilize string interpolation in Vue 3 template attribute with quotation marks

I'm struggling to make the method buildAbbrToolTip() utilize the dynamic data from column.m_parse_hi in order to display the correct text definition for an abbreviation in the tooltip. Currently, I'm encountering a console error that says TypeEr ...

Having trouble sending a post request to the /register endpoint

Recently, I've been working on setting up a user registration process using Node.js. However, I've encountered an issue where every time I send a POST request with email and password, I receive a 404 error in Postman stating "Cannot POST /signup" ...

Generating Speech from Text using jQuery API in HTML

Can a website be created to detect textbox text upon longClick by the user, and function across various browsers? The site should also have mobile compatibility. Appreciate any help! ...

Error: Material-UI prop type validation failed. Please specify either children, image, src, or component prop for CardMedia component. This error occurred at

I encountered an issue while trying to utilize the CardMedia component from Material-ui. The error message received was 'Failed prop type: Material-UI: Either children, image, src, or component prop must be specified. at CardMedia'. I attempted v ...

Using file types in Vue 3: a beginner's guide

In order to use file-type to determine not only the extension but also ensure the headers are correct I would need to use one of the methods listed on their GitHub page. In version 19.0.0 it says fileFromFileType doesn't have such an export and in 16. ...

Deep-diff JavaScript functions are not permissible for use

In my AngularJS application, I am currently attempting to utilize a JavaScript package. To reference it in my index.html file, I added the following code: <script src="deep-diff-0.3.1.min.js"></script> Furthermore, in my controller, I am usin ...

Leveraging an external React library to utilize .ogg files for audio playback specifically in the Safari

Hey there! I'm currently working on incorporating ogg-opus audio playback in a react app on Safari (since it doesn't support .ogg format). My project was initialized using create-react-app. I came across the "ogv.js" library, which supposedly h ...

vue implementing autoscroll for long lists

I am looking to implement an autoscrolling log feature on my webpage that is dynamically fetched from a REST endpoint. To handle the potentially large size of this log, I decided to use vue-virtual-scroll-list. Additionally, I wanted the log to automatical ...

Create a pop-up window within a single controller using Angular.js

I followed a tutorial to create this code. I am interested in learning how to utilize just one controller for generating the dialog box. Currently, I am using two controllers for this project. Any guidance or tips would be greatly appreciated. View my cod ...

What steps are involved in creating an xlsx file using Express and Exceljs, and then sending it to the client?

I am currently working on separating controllers and services in my Express app. One of the services I have generates an XLSX file using ExcelJS. I'm looking for a way to reuse this service without passing the response object to it. Is there a method ...

Why do style assignments lose their motion when executed right after being made?

If you take a look at this specific fiddle in Webkit, you will see exactly what I am referring to. Is there a way to define the style of an element when it is first specified, and then its final state? I would like to be able to fully define a single-ste ...

What is the process for loading a script file from within a component's HTML?

My goal was to include a specific script file in the component html, but I noticed that when I added the script reference within the html itself, the inner script file was not rendered along with the component on the page. Component import { Component } ...

What are the best techniques for creating animations in AngularJS?

I've been trying to figure out how to animate in AngularJS by searching online, but I haven't found a perfect solution yet. html <span class="sb-arrow down" ng-click="hideSampleList($event)"></span> ...