Online experiments

Like many people in Experimental Psychology, I have become interested in running experiments online, including those where we ask participants to view images or animations and record their reaction times.

Here are some useful links and hints for doing this with commonly available software.

UPDATE: some of this no longer works thanks to changes in qualtrics etc.

Links

  • jspsych is a great, open source tool for doing experiments in a browser. Learning a little javascript is useful for making the most of this.
  • I've also used lab.js.
  • I use qualtrics for online surveys, but this can also be used to store the data from a jspsych experiment (which is useful if you don't have your own web server).
  • This blog was very useful for working out how jspsych and qualtrics can work together (see also this code)
  • I have used crowdflower.com and prolific.ac to recruit paid participants.

Example

Here is one of the jspsych example experiments working* within the browser, as well as within qualtrics.

jspsych example experiment (gives results on the screen)

The same example experiment in qualtrics

(*at least they are working for me at the moment! If you have issues, try changing browser to Chrome or Firefox)

Hints

  • Under "Look and Feel" in Qualtrics, you can remove the branding so that you have a plain browser window. That is also where you find the html Header where you can place javascript for linking the jspsych libraries, css etc.
  • Qualtrics doesn't provide an easy way to upload a series of images or resources. It is better to host these somewhere else (Dropbox works) and then call the URL.
  • You can use Qualtrics' "Loop and Merge" to create a list of trials, but when jspsych is in control it is better to build this list in javascript or load it in from an external script.
  • In order for reaction time experiments to work, you need to disable the JFE mode which is the default when you launch a Qualtrics survey. This means that you must alter the URL by adding "&Q_JFE=0" to the end. ** UPDATE: as of Spring 2017, Qualtrics makes this even more difficult. Extract the survey ID from the URL (it will be something like "SID=SV_bjBxnQgQgGQAfqt"). Then make sure that your link fits this pattern: ....qualtrics.com/SE/?___ID HERE___&Q_JFE=0
  • The javascript from the examples above saves the jspsych data to an embedded data field in Qualtrics, where it can be downloaded as text. You may need to do some parsing, for which I've found it is easiest to export the qualtrics data as xml.