Capture timezone for respondents and use it for sending surveys at specific times | XM Community
Skip to main content

Hello there, 

 

I am a graduate student currently developing a survey to collect data for my doctoral thesis this fall. More specifically, I am conducting a repeated measures/within-subjects research design where participants will need to complete a survey at three different time points within a workday (i.e., 09:30, 12:30, and 15:30). 

 

I have developed the four different surveys:

  1. SURVEY 1 is where participants consent to participate and select a weekday to receive the series of surveys
  2. SURVEY 2 has all of the study variables as well as some demographic, marker, and control variables that will be measured only once (time invariant) 
  3. SURVEY 3 & 4 only include the study variables of interest

So, my sample will be all of the United States so gathering their timezone information in SURVEY 1 is paramount. I have read some articles on how to capture time zone data using Javascript such as here where Javascript is used and here where JS is used to extract specific information about timezone. 

 

I know nigh nothing about JS and the instructions used throughout some of these discussion posts only provide code and not a clear process on how this would work; this is where I am soliciting the community’s help. To be clear, I want to get time zone information from the participant without asking them to provide it (human error and deception are real), so I would like to extract it somehow. Then, I would like to use this information so that I can send the surveys out to the respective participants at the during the correct time. My personal Qualtrics account is set up Eastern Time, so if a participant signs up for my study at the current moment, they would receive the series at 06:30, 09:30, and 12:30 which is not idea at all considering participants should already be at work. Any advice is welcomed, though specific details would be helpful, such as how to collect the timezone info, use that to categorise individuals into timezones, and then send the surveys to them at the appropriate time. It should be noted that I also include a question where participants select a specific date in the future to receive the surveys so that is handled properly. 

 

I look forward to any and all replies and thanks in advance. Really looking forward to becoming a (an academic) doctor :) 

 

This will store the system’s (not necessarily the same as that of the user’s) timezone in an embedded data called resTimeZone

Qualtrics.SurveyEngine.addOnload(function () {
Qualtrics.SurveyEngine.setEmbeddedData(resTimeZone, Intl.DateTimeFormat().resolvedOptions().timeZone);
});

Add it to any question of your survey.


Leave a Reply