Integrating Prolific with JATOS

I have a study written in jsPsych and run on Prolific using JATOS as my server, and I’m having real trouble getting URL parameters from prolific. I wondered if anybody had successfully integrated prolific and JATOS and had any advice?

I have currently switched to asking participants to paste their prolific IDs in manually but ideally I would like to get URLs automatically to avoid any element of user error.

I have tried following the instructions provided by JATOS (below) but this crashes the script with the error pasted below

var prolific_id = jatos.urlQueryParameters.prolific_pid;

vars.prolific_id = prolific_id;

error:
Uncaught TypeError: Cannot read properties of undefined (reading 'prolific_pid')

This happens if I test the code manually by pasting the JATOS worker link and adding a made up prolific id (e.g. ‘&prolific_pid=dffjhdjgh’) and also if I test it using the preview function in prolific.

As my experiment is written using jspsych and I had previously used jsPsych.data.getURLVariable('PROLIFIC_PID')
to get the ID but this is now returning me an undefined.

If anyone has any experience integrating Prolific and jsPsych using JATOS I’d love any tips or feedback.

Thank you,

Juliet

Hi @JulietDunstone , I don’t have experience with JATOS so this is probably not helpful - but is anything case sensitive?

Ooh potentially… I am directly copying the instructions given by JATOS on their site that have prolific_pid in lower case, but it might be that they have a case error in their instructions and I need to make it upper case.

I will need to wait for my current batch to finish running but then I will investigate.

Thank you!

(If it does turn out to be just a case-sensitive issue I will be both livid and embarassed, but very grateful that it’s an easy fix)