psychopy.org | Reference | Downloads | Github

How to assign a new ID to each participant?

Initially, participants are asked to enter their participant’s ID in the box as soon as the experiment is launched. But how can I assign ID automatically in the beginning of the experiment? Can I ad a line of code which generates and ID in Experiment info?

Assign Consecutive Participant IDs

I have written a web app. which can be used for Pavlovia experiments: https://moryscarter.com/vespr/pavlovia.php

The page takes four parameters: folder, experiment, id and researcher.

folder (required) is your Pavlovia username

experiment (required) is your experiment name as formatted for the study link

id (optional) is a unique code which you could assign, for example as a random number in Qualtrics, so you can link your PsychoPy data back. It is passed to Pavlovia unchanged

researcher (optional) is also passed to Pavlovia unchanged. I am using it to ensure that participants start in Qualtrics where they can view the participant information sheet, not Pavlovia.

participant is assigned by my app. as a consecutive number. You could use a modulus of participant in order to assign participants to conditions. The number increments whether or not the participant finishes. It would be considerably more complicated to re-assign aborted participant numbers.

Example URL: https://moryscarter.com/vespr/pavlovia.php?folder=Wake&experiment=prospective-memory-ldt&researcher=wakecarter&id=test

Best wishes,

Wakefield