First, when the experiment finishes it gets stuck on the last screen.
If you've added the JS code shown, that would indicate that the message event isn't getting fired, and therefore, the next button doesn't get clicked. It would also mean the experiment data isn't populated in Qualtrics.
But do you have any idea of how that would work for a different platform that is not labjs, like psytoolkit or neurotask?
For the same approach to work with other platforms they would have had to implement a "webworker" exactly the same way as labjs. That is highly unlikely.
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?
It appears that way because it is in an iframe. The only way to have it full screen would be to execute it in browser window. It is possible to integrate with other systems that way using Save & Continue. However, the integration (returning to Qualtrics and retrieving the data) is completely different, and the other platform(s) have to be set-up to support it.
I have no experience with Neurotask, so I can't comment on it. The answers below are therefore based on some work that I have done with Labs.js and PsychToolkit.
First: The reason why your studies are getting stuck at the end screen is that you are not providing a way to move forward. In Labs.js, they generate this custom event, which signals to Qualtrics to move to the next page. Line 5 starts the detection and line 14, moves people to the next page. Since, this isn't happening in PsychToolkit, there is no moving forward. I recommend creating a button at the end with the
onclick
attribute set to
clickNextButton
. When you run the demos on the PsychToolkit site, you'll see that they have a button to show data, something like that.
Second: It depends on the data type that is being created. If the data generated is a string or number, or an array then you can just change the names and it will work. But if it an object, you'll need to first convert it into a string and then store it. Otherwise, you'll just get the text Object as the data.
Third: The screen is getting cut/scroll bars are appearing because you haven't configured the height/width of your
iframe
accordingly. If you look at the HTML that labs.js asks you to use as your question in Qualtrics, in the first or the second line, you'll see something like
height=??px
or
min-height=??px
Change these to avoid the scroll bars/screen cuts. Fullscreen is also possible, and you can simply add a button for it. Take a look
here to see how to get it done.
Fourth: If you aren't able to make it work properly in Qualtrics. You can send them to the other page while passing the survey
responseID
(stored in
${e://Field/ResponseID}
) in your URL, which you can extract and store at the destination. You'll have to see the documentation of the destination to get an idea about adding parameters to the URL. For a demo, preview a survey, open the console and type the following command over there
document.URL.split(/\\?|\\&/gm)
you'll see that your URL has three parts, the first is the base URL, the second your channel and the third the survey version. Usually it by adding stuff after a
?
but the destination platform may have its own requirements.
Thank you for your help.
Regarding the first point, how can I make that button at the end? The thing is that in Psytoolkit you need to embed the experiment into a survey and maybe that's part of the problem...? So should I make the button inside the Psytoolkit experiment script, or maybe something in the survey options in Psytoolkit? I attach to you the 3 html files have for the experiments... Maybe that helps.
Secondly, can you see in these files I attached what type of data is being created? I don't know how to identify that...
Thirdly, I have tried to play around a bit with the measures in the iframe but if I don't get the scroll bars, then the iframe in which I have embedded the experiment gets too big and participants need to use the general scrollbar of the website to see it all. This thing that you suggested to have a 'full screen button', where should I implement this code? In Qualtrics or in the Psytoolkit experiment?
Fourthly, do you know if there is there a way that this ID I have in the URL becomes the same ID that participants introduce from their Prolific account?
Assets.rar
{"embed-error": true}
In the files you have attached the variable is called
outputdata
. It is a string, so you can can directly store that as an embedded data.
As for the others, you can easily find answers to them on the internet.