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

+1 vote

I was hoping someone could help me with the Javascript for storing timestamps.
I understand that this will require internal variables. As an initial test I created three IVs: "T105_01", "T105_02" and "T105_03".
I want to record the timestamp (in millisecond) each participant answers selection questions T101 and TO01, and clicks "Next" on the same page, storing in the three IVs, respectively.
Question 1 is not mandatory to answer, therefore, T105_01 could be null.
Any help would be appreciated, thank you!

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

1 Answer

0 votes

It depends on what you need, exactly. What you have in general are the times (in seconds) between the server sending the page, and the respondent sending their answers back (TIME000 variables).

If you need a more accurate measure, JavaScript is what you need. The principle is this: You store the timestamp (that is the number of milliseconds since 01.01.1970) when the page is loaded (or another trigger you choose) and the time when an answer is given.

Challanges are these:

  • Loading and displaying the page is a process: First, the HTML code is loaded, then processed, then images and layout is loaded, then the layout is built, then (maybe that happend a few times before) the page is rendered. You have to decide whan your time starts. Depending on the layout this may account for a difference up to one second, or 1000 ms.
  • Respondents may change their opinion.What time do you measure, the time till the first or last choice? Or do you hide the options after the first choice?
  • If you ahve more questions on a page, it gets even more complicated, as respondents may answer them in different order.
  • And even word you you have mandatory questions, and the page reloads. What it the response time, then?

Finally, you have time firt event when you store timestamp 1, and then another event when you store timestamp 2. You calculate the difference, and then write that into an internal variable.

If you want to relax a bit, try the "assignment" question or the "selection sequence" that you find as question types in SoSci survey. These are optimized for collecting response times and circument a few of the issues above.

by SoSci Survey (190k points)