0 votes
in SoSci Survey (English) by s168567 (165 points)

Thank you for the answer!
What I want to measure ultimately is the time each respondent takes from answering the first question to answering the second question. In my survey, I use the first question as a button to show an additional piece of information (with dynamic Javascript). Therefore, this question only has one option and isn't mandatory. Essentially I want to measure how long people take in reading the additional info. If this info isn't requested, the time would be 0.
Considering the challenges you mentioned, I made it automatic to jump to the next page when the second question is answered. This way the respondents can only make a choice once, which I will make sure they are aware of.
That's why I would like to store timestamp 1 for when question 1 is answered and timestamp 2 for when question 2 is answered. However, I could not find an example of such Javascript, and I am not an expert in programming..
I tried the selection sequence, but I don't think it's suitable for this case.
Here is a pretest link to my survey: https://www.jdm.uni-mannheim.de/sosci/loanforecaster/?act=kvg014sesC87eN6XlMPXp3lj (Page 8 is an example of what I described)
Really appreciate your help!!

1 Answer

0 votes
by SoSci Survey (328k points)
selected by s168567
 
Best answer

In my survey, I use the first question as a button to show an additional piece of information

Great, this gives you a trigger to measure the first timestamp. You can store it in JavaScript (temporary in the browser window) like this:

var ts0 = Date.now();

I made it automatic to jump to the next page when the second question is answered.

Then use the JavaScript-check for missing answers as second trigger. And also store the time difference in that function.

function storeTime() {
    var ts1 = Date.now();
    // Write into internal variable (that must have been dragged on the page)
    document.getElementById('IV01_01').value = ts1 - ts0;
    return true;
}
SoSciTools.questionnaire.attachCheck(storeTime);
asked Jan 17, 2021 in SoSci Survey (English) by s168567 (165 points) Randomization with dynamic element

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...