What is the easiest way to capture participant ID from a url and save to the .csv? #737
Answered
by
jodeleeuw
Cluster-Bomb
asked this question in
Q&A
-
Hi there, Need to capture the participant ID from the experiment url and somehow save it to the .csv along with all the other trial data. I have no problem capturing the ID using jsPsych.data.getURLVariable(var_name) - however I dont know how to write it to the .csv. Cheers |
Beta Was this translation helpful? Give feedback.
Answered by
jodeleeuw
Jun 3, 2020
Replies: 2 comments 6 replies
-
jsPsych.data.addProperties() will do what you are looking for. var subject_id = jsPsych.data.getURLVariable('PROLIFIC_PID');
jsPsych.data.addProperties({
subject_id: subject_id
}); |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
jodeleeuw
-
Thanks - works great! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jsPsych.data.addProperties() will do what you are looking for.