Daisy Chaining
Daisy chaining means going from one web application to another in a single participant session. It normally requires passing the values of one or more variables from one app. to the next so that the data can be matched.
There are two aspects to consider.
The first is sending values TO Pavlovia. I highly recommend that you send a value for participant (without changing the spelling or capitalisation) since this value will start the data file and log file names. A column for session always appears in the data file, so I usually use this too.
To send a value to Pavlovia, it must be included in the URL. For example.
Prolific: https://run.pavlovia.org/user/study/?participant={{PROLIFIC_ID}}
Qualtrics: https://run.pavlovia.org/user/study/?participant={e://Field/ResponseID}
Sona: https://run.pavlovia.org/user/study/?participant=%SURVEY_CODE%
Note that if you add a second variable, you must use &
instead of a second ?
. If you want to use the variable during the experiment, rather than just have it appear in the data file, add it to the expInfo dialogue box in Experiment Settings.
If you want participants to be sent to another web app. after they complete the experiment on Pavlovia, add a completed URL in Experiment Settings / Online. Variables received by or set in the expInfo dialogue box can be added here directly. For example:
**Prolific: ** $"https://app.prolific.co/submissions/complete?cc=3E6BEA76&PROLIFIC_ID=" + expInfo['participant']
**Qualtrics: ** $"https://brookeshls.co1.qualtrics.com/jfe/for/SV_123456?participant=" + expInfo['participant']
**Sona: ** $"https://yourschool.sona-systems.com/webstudy_credit.aspx?experiment_id=123&credit_token=abcd&survey_code=" + expInfo['participant']
If you want to change the URL after the experiment has started, then you need to add the following JavaScript code where myCompletedURL is a variable containing the new completed URL. You must have something in the completed URL field in Experiment Settings for this to work.
psychoJS.setRedirectUrls(myCompletedURL, myCancelledURL)
In Pavlovia Surveys use the completion URL field on the study overview tab. The syntax is slightly different.
**Prolific: ** "https://app.prolific.co/submissions/complete?cc=3E6BEA76&PROLIFIC_ID=" + {participant}
**Qualtrics: ** "https://brookeshls.co1.qualtrics.com/jfe/for/SV_123456?participant=" + {participant}
**Sona: ** "https://yourschool.sona-systems.com/webstudy_credit.aspx?experiment_id=123&credit_token=abcd&survey_code=" + {participant}
In this case variables can be set during the survey so an equivalent of setRedirectUrls isn’t needed. Do not put anything in the completion URL field of a Pavlovia Survey if the survey is being embedded into an experiment.