| Reference | Downloads | Github

Passing variable from PsychoJS/Pavlovia to Qualtrics? (Not participant ID)


I know that certain variables can be passed from Qualtrics to Pavlovia and then back to Qualtrics by inserting them in the URL, like participant ID. However, I want a variable generated within the PsychoJS task (e.g. RT, the average response time of a certain block of trials) to be passed to Qualtrics for later use. Is that feasible? If yes, then how?

Any comment is appreciated!


For this I’m using:

Begin Experiment

linked = 0

Begin Final Routine


Each Frame

if t>.5 and linked == 0:,"_self")
    linked = 1

Text “Please click on Leave to continue.”

If you want the experiment to end as well, then don’t have ,"_self" in the link.

Thanks for the input. I don’t think I’ll need the weblink info in the Python portion, so I used your codes as a reference and rewrote them in JS. (The Py to JS convertion doesn’t really work well with me)

A couple of major difference I noticed -

But anyway, it seems to have achieved what I wanted.

The first one was an error introduced when I changed the URL from a Qualtrics preview link (which already has a ? in it) to a live link.

The second works for me because I have webbrowser=window in code_JS as per my crib sheet (see pinned post)

Even when I’m not going to use an experiment offline I code the snippets in Python with as much auto translation as possible

1 Like