Hi all,
I am trying to integrate different platforms for a study that will consist of different parts, each of them build in different platforms (psytoolkit and Neurotask) and/or with different URLs. One option I have found to do this, is embedding the experiments in my qualtrics survey the way they propose in the lab.js website Working with Qualtrics — lab.js 20.1.1 documentation. However, when following these steps to integrate my psytoolkit experiments, for example, I am encountering three problems:
- First, when the experiment finishes it gets stuck on the last screen.
- Secondly, I don't know how to embed the data from the experiment into Qualtrics. In the link I shared from lab.js, they use this code:
const page = this
page.hideNextButton()
// Listen for the study sending data
window.addEventListener('message', function _labjs_data_handler(event) {
// Make sure that the event is from lab.js, then ...
if (event.data.type === 'labjs.data') {
// ... extract the JSON data lab.js is sending.
const data = event.data.json
// ... save data and submit page
Qualtrics.SurveyEngine.setEmbeddedData('labjs-data', data)
window.removeEventListener('message', _labjs_data_handler)
page.clickNextButton()
}
})
And therefore, the part where they embed the data is:
Qualtrics.SurveyEngine.setEmbeddedData('labjs-data', data)
But do you have any idea of how that would work for a different platform that is not labjs, like psytoolkit or neurotask? Do I just change the 'labjs-data' to a custom name that I give? Or it should be something specific?
- Thirdly, when using this method, the screen of the experiment gets 'cut' and the experiment is embedded in a 'square' but it would be nice if it would fit better, or full screen... Do you know if that's possible?
If you know of any other way of embedding links into Qualtrics (in a way that they can then continue with the survey in Qualtrics) and also the data from the experiments (so that the participants' IDs are linked over platforms), please let me know!
Best,
Marina