psychopy.org | Reference | Downloads | Github

Link PsychoPy/Pavlovia to prolific.ac

URL of experiment: https://gitlab.pavlovia.org/ccliftonma/relnouninterp_a

Description of the problem: Could you point me to some elementary hand-holding that could provide details about linking a PsychoPy experiment to prolific.ac? I have not been able to solve the following problems:

  1. When my experiment starts up on pavlovia, I see the screen asking for values for experiment settings (participant, etc.) I do not want my participants to see this. How can I inhibit it?
  2. I do not know how to get the participant to include their prolific ID in the data file. Is that possible?
  3. I do not know how to send the participant back to prolific.ac at the end of the experiment.
    Once I have answers to these admittedly elementary questions, I will have questions about code components I have written (and used on my local machines) not working - code that e.g. creates counterbalanced versions of an experiment or that gives error and RT feedback. I’m sorry to have to be asking the first three low-level questions. I wish there was an appropriately low-level psychopy online introduction, similar to https://www.psychopy.org/online/online.html but with more details.

Essentially, it all comes down to passing participant ID in the URL fields, but I haven’t written the documentation to explain it yet.

If your experiment is at
https://pavlovia.org/run/my_name/my_study/html/index.html
then you could call
https://pavlovia.org/run/my_name/my_study/html/index.html?participant=<ID_from_prolific>
and the participant parameter will become the one provided by Prolific (and won’t be presented in the starting dialog.

Then, at the end of the study you need to return that value back to Prolific. To do this go to the Experiment Settings in your PsychoPy experiment. Under the Online tab you’ll find an option to provide a URL for when a participant completes, or fails to complete the study. That will be some Prolific URL that you hopefully know, and you’ll need to provide the ID number back again. Probably you’ll need to set this to be code so that you can add the ID (which is a variable) at the end, so something like:
$"https://my.prolific.location/?id="+expInfo['participant']

Hope that makes sense, and sorry I haven’t gotten round to documenting this properly. Bit of a whirlwind here!

2 Likes

Many thanks. That makes enough sense that I suspect it’ll get me going. Much appreciated. (And more doc will be equally appreciated when and if…)

Another thank you and a bit more info, which other users might find helpful:

  1. The return URL seems to work - but it doesn’t appear to need the +expInfo[‘participant’] part for Prolific
  2. Prolific seems to require a slightly different URL call - it likes to supply URL parameters itself, winding up with the following URL for my experiment: https://pavlovia.org/run/ccliftonma/relnouninterp_a_tryagain/html/?PROLIFIC_PID={{%PROLIFIC_PID%}}&STUDY_ID={{%STUDY_ID%}}&SESSION_ID={{%SESSION_ID%}}
3 Likes

Thanks for getting back to us with that - I’ll make point #2 more clear in the documentation that I’m writing on this.

OK, so the Prolific system provides you with a completed code and somehow it tracks the participant on return without needing to receive their ID back again? Fair enough. I guess they must be storing a persistent cookie of some sort to track the user (I’ll check with the directly)

Glad you got things working :slight_smile:

1 Like