Skip to content
Discussion options

You must be logged in to vote

Hi @TaoJin000, you can pass the participant ID from Qualtrics to Cognition and back to Qualtrics again using URL query parameters. For instance, if your redirection link is "myexperiment.cognition.run", then you could pass the the ID to your Cognition task with "myexperiment.cognition.run?id=123abc".

Then, in your Cognition task, you'll need to get the ID from the URL and store it in a variable. jsPsych has a convenience function for this called jsPsych.data.getURLVariable.

At the end of your Cognition task when you redirect to Qualtrics, you will again need to append the ID to the end of the link. So your jsPsych code will look something like this:

const ppt_id = jsPsych.data.getURLVariable

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TaoJin000
Comment options

Answer selected by TaoJin000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants