Recording data from a separate html page | XM Community
Skip to main content

I want to create an incentive compatible study so that participants can spin a wheel to get a free reward, but I can't seem to find a way to record whether they got the free reward or not.

I inserted the wheel from a webpage, using the following code in the html view.

">https://youjenjen.github.io/wheel/">


Then I tried to record the result using the embedded data code in javascript so that I can download the .csv from Qualtrics later on and send the free reward to those that are applicable.

Qualtrics.SurveyEngine.addOnUnload(function()
{Qualtrics.SurveyEngine.setEmbeddedDate("wheel",data[picked])
});

But this code doesn't seem to work. Could anyone help me with this problem?

Below is the code for the webpage with the spinner wheel.
Screen Shot 2021-08-13 at 11.42.42 AM.png
Screen Shot 2021-08-13 at 11.43.12 AM.pngScreen Shot 2021-08-13 at 11.43.28 AM.pngScreen Shot 2021-08-13 at 11.43.35 AM.png

You'll have to post a message to the parent element for this.
Search Google for communicating with iframe.


Leave a Reply