← All tutorials
Drop a jsPsych task into a session
An existing reaction-time task runs without changes in a task segment. Its results come back as variables.
-
Paste the task in and bind its results
In a task segment, enable the custom HTML application. Paste the jsPsych page into Edit HTML… without changes.
The page sends its results in one
postMessageof typecarrier-task-data. Give an OUT binding to each key that you want to keep. Each binding makes a variable with the same name, which the rest of the session can use.The reaction-time task goes in without changes. accuracyandmeanRtare bound tortAccuracyandrtMeanMs. -
Run it and read the results back
The participant does the task in the session. Carrier saves the results with the segment. You can use them in all places that accept variables.
In this clip, the next segment shows them with
{{var.rtAccuracy}}and{{var.rtMeanMs}}. They can also control matching or go into the prompt of an agent.Ten trials of the task, then a results page filled from the bound variables.