These notes cover getting our JATOS server (which runs the experiment) and our SONA server (which handles participant recruitment and credit awards) to talk to each other. This should be the last step, when you’re sure the experiment works correctly on JATOS in all other respects.

To set up the SONA to JATOS and back to SONA links, you need to take the following steps:

Note 1: Variable names are case-sensitive, so make sure you us sonaId throughout, NOT SonaID, or SonaId, or…

Note 2: The credit is only granted when the participant is redirected to SONA. This means the OpenSesame experiment has to complete. So, make sure your instructions make this clear, by having your debrief screen end with something like “PRESS A KEY TO COLLECT YOUR PARTICIPATION POINTS”.

1. On OpenSesame desktop app

if (window.jatos && jatos.urlQueryParameters.sonaId) {
    console.log('Sona information is available')
    vars.sona_participant_id = jatos.urlQueryParameters.sonaId
} else {
    console.log('Sona information is not available (setting value to -1)')
    vars.sona_participant_id = -1
console.log('sona_participant_id = ' + vars.sona_participant_id)


3. On SONA

Do the following under “Change Study Information” on SONA:[sonaId]

4. Back on JATOS

5. Back on SONA