How to connect Embedded Experiment with Questionnaire | XM Community
Skip to main content
Question

How to connect Embedded Experiment with Questionnaire

  • January 16, 2019
  • 1 reply
  • 7 views

kikiycao
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

Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • January 12, 2023

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