How to connect Embedded Experiment with Questionnaire | XM Community
Question

How to connect Embedded Experiment with Questionnaire

  • 16 January 2019
  • 1 reply
  • 1 view

Hi everyone,

I am writing to ask how to connect Embedded Experiment with Questionnaire? I followed instruction and embedded a jsPsych experiment. It works well but after the experiment, the questionnaire doesn't show up.

The experiment runs well and data can be collected. I added JavaScript:

window.addEventListener('message', function(event) {

if (event.data.type === 'jsPsych.data') { // Make sure that the event is from jsPsych
const data = event.data.json

Qualtrics.SurveyEngine.setEmbeddedData('jsPsych-data', data) . // ... save data and submit page
document.querySelector('.NextButton').click() } })

Has anyone tried to embed external experiment and worked before?

Thanks for your help!

Regards,
Kiki

1 reply

Userlevel 7
Badge +27

Hi there, if you still need, I was able to make it through those instructions and it looks to be working for me in the attached QSF.
labjs_Stroop.qsf

Leave a Reply