Passing participant number to Qualtrics

I have an experiment that goes from Sona --> Qualtrics --> Pavlovia --> Qualtrics --> Sona. Participant numbers are being sent from Sona to Qualtrics to Pavlovia with no problem. For participants who don’t complete the experiment (press Escape), they are redirected back to Sona without the last survey. I believe that this is working fine and they are being granted credit automatically. Participants who do complete the experiment are being sent back to Qualtrics for a second survey. The participant number is not being sent correctly and I’m unsure why.

Incomplete URL (to Sona): https://ucf.sona-systems.com/webstudy_credit.aspx?experiment_id=1982&credit_token=cd3abfd63e0442e09844b1cc8cc2c9fb&survey_code=" + expInfo[‘participant’]

Complete URL (to Qualtrics): http://ucf.qualtrics.com/jfe/form/SV_1z4XJUJHFVWrs4B?id=" + expInfo[‘participant’]

In Qualtrics, the id number shows up as " expInfo[‘participant’] and I’m not sure why.

Any help is appreciated!
Elisabeth

Hi Elisabeth,

There are some instructions on how to pass IDs in the JavaScript Crib Sheet. Could that help you out?

Best, Thomas

That’s what I used to create the redirect link in the first place. I’m wondering if this is a Qualtrics problem, not a Pavlovia problem, as it is only an issue going from Pavlovia to Qualtrics and not from Pavlovia to Sona. Not sure if anyone else has experienced this before.

I use the same set up in my experiments SONA to Qualtrics to Pavlovia to Qualtrics to SONA.

In the redirect link in psychopy try putting a $ and a " before the link. So your link would be

$“http://ucf.qualtrics.com/jfe/form/SV_1z4XJUJHFVWrs4B?id=” + expInfo[‘participant’]

As I understand it, the javascript needs to recognize the first part as a string and then add on the variable to that string.

Hope that helps!

1 Like