We are collecting data for a study using custom js code. The code is supposed to end the survey whenever the participants take the full amount of time for a question three questions in a row. The code and survey flow seem to work fine when we test it in preview and published versions but in our two data collection session that we had so far, the survey seems to crash or end prematurely for our participants, even though they have not met the condition of taking the full amount of time (150 seconds) three times in a row (see attached file). Some participants make it further than others but the pattern seems to be rather random.
Any help or suggestions of making the survey more stable would be highly appreciated as we have more data collection sessions coming up soon.
Code:
Qualtrics.SurveyEngine.addOnReady(function()
{
var startHolder = new Date();
var auto = Qualtrics.SurveyEngine.getEmbeddedData('auto');
console.log(auto, "in a row")
Qualtrics.SurveyEngine.addOnPageSubmit(function() {
var TimeDiff = new Date() - startHolder;
TimeDiff /= 1000;
console.log("Time diff:", TimeDiff)
if(TimeDiff < 150) {
auto = 0;
console.log("auto is:", auto);
Qualtrics.SurveyEngine.setEmbeddedData("auto", auto)
} else {auto = auto + 1; console.log("auto is:", auto);
Qualtrics.SurveyEngine.setEmbeddedData("auto", auto)}
});
});
phase1_qualtrics_support.xlsx
Survey ends prematurely and crashes sometimes
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
