Use Embedded Surveys in online experiments
If you are running a study online, you probably want to show your participants a participant information sheet and ask them to consent. You probably also want to ask them some demographic questions. You might even what to present a questionnaire alongside your experiment. Before the Pavlovia Survey routine I used to either use Qualtrics or the VESPR Study Portal to present the participant information sheet and sometimes also sent participants to a separate Qualtrics survey at the end of the experiment. Since 2023 I have been using Pavlovia Surveys instead for most use cases.
Notes
The survey id can’t be a variable so if you want to show different surveys to different participants, you will need to use the Num. repeats parameter of a loop around each survey to determine which ones get presented.
If you use Survey id then the data from a submitted embedded survey will also appear in the responses tab of your survey on Pavlovia.org. However, if you present a survey more than once within the same experiment then only the most data is saved. You will need to explicitly save earlier data within your experiment, especially if the repeated survey is within the same iteration of a loop or you have istrials unticked.
To access your survey data use surveyResponse = surveyRoutineName.getResponse()
to copy the responses to a dictionary you can access. To access the response to an individual question you can them use surveyResponse['blockName/questionName']
. To check the value for blockName you can print(surveyResponse)
and then look at the Browser Tools.
If you need to use an older version of the survey, set the PsychoPy version of your experiment to 2024.1.4. This version only allows for single blocks so you would use surveyResponse['questionName']
instead.
Make sure that your survey doesn’t have a completionURL.