I've integrated an external page that send messages back to Qualtrics where it is saved in embedded data. There seams to be several problems with the way that Qualtrics manage external pages in iframes. First, when the user press Next in Qualtrics is the external page in the iframe reoaded and therefore are init messages sent from the external page back to Qualtrics with the result of destroying the collected data. Second (and less serious), Qualtrics seams to load the external page in the iframe twice which result in that two init messages are sent from the external page back to Qualtrics (which in this case means that randomization is performed twice in the external page where this logic is placed).
The external page can be seen here (where it has been embedded in an iframe in a similar way as in Qualtrics).
Qualtrics JS used to save the result
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
window.addEventListener('message', function _data_handler(event) {
if (event.data.sender == 'press_zero') {
Qualtrics.SurveyEngine.setEmbeddedData('press_zero_data', event.data.msg)
console.log('Main window:', event.data.msg)
}
if (event.data.sender == 'press_zero_cond') {
Qualtrics.SurveyEngine.setEmbeddedData('rand_prosocial', event.data.msg)
console.log('Main window:', event.data.msg)
}
else
console.log('Some other message')
});
var iframe = document.getElementById("press_zero");
iframe.contentWindow.focus();
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Additional information is available here (in a github issues used in the project):https://github.com/colmsjo/qualtrics/issues/4
Any help to work around these problems is much appreciated!!
Integration of external page
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

