Embedding Qualtrics Survey in jsPsych #1889
-
Hi, Has anyone perhaps fiddled around - and succeeded - with embedding Qualtrics surveys within jsPsych experiments? My idea:
Looking for tips specifically on:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @SHogenboom, Qualtrics surveys have to be presented via a Qualtrics server, which is why it's not really possible to embed them in a jsPsych experiment. If you don't want to redirect between websites, then I think the best you can do is to present the Qualtrics survey inside of an iframe (which is just presenting one webpage inside of another one). One way to do this might be to use the jsPsych external-html plugin, but I'm not sure if that plugin allows you to present a remotely-hosted page, or if it's just for HTML files in the local experiment directory. Another option might be to use the jsPsych call-function plugin to put the iframe on the page. You would need to set the To pass information from jsPsych to Qualtrics (e.g. participant and condition numbers), you can use URL query parameters in your Qualtrics link and save them to Embedded Data (see Qualtrics docs here). I'm not totally sure how you can detect the end of a survey that's running in an iframe in order to end the Qualtrics 'trial' and move on with the jsPsych experiment. I came across a few options on this stackoverflow post and this blog post. Let us know if you figure out a solution for this and/or need further guidance. |
Beta Was this translation helpful? Give feedback.
-
@SHogenboom you might find this website useful: https://kywch.github.io/jsPsych-in-Qualtrics/ |
Beta Was this translation helpful? Give feedback.
Hi @SHogenboom, Qualtrics surveys have to be presented via a Qualtrics server, which is why it's not really possible to embed them in a jsPsych experiment. If you don't want to redirect between websites, then I think the best you can do is to present the Qualtrics survey inside of an iframe (which is just presenting one webpage inside of another one).
One way to do this might be to use the jsPsych external-html plugin, but I'm not sure if that plugin allows you to present a remotely-hosted page, or if it's just for HTML files in the local experiment directory. Another option might be to use the jsPsych call-function plugin to put the iframe on the page. You would need to set the
async
par…