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):" + expInfo[‘participant’]

Complete URL (to Qualtrics):" + expInfo[‘participant’]

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

Any help is appreciated!

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

$“” + 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