I want to show my respondents a website via hyperlink and then ask them some questions about this website. I want to make sure that they followed my instructions and clicked on that link.
How to do this?
I wanted to do it like this guy:
https://www.qualtrics.com/community/discussion/comment/28646#Comment_28646So, he uses JS to set embedded data, wether or not they clicked on his link. I used his code to do the same and I defined the embedded data field in the survey flow but it does't work. The field for the embedded data just stays empty.
How can I solve this problem?
Page 1 / 1
Hi,
Use the below JS code, this will disable the Nextbutton until the respondent click on the hyperlink. If they click on hyperlink then the next button will be enabled.
Make sure you create the "LinkClicked" embedded variable at the stat in survey flow.
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('#NextButton').attr('disabled',true)
var cnt=0;
jQuery('a').click(function(){
cnt++
Qualtrics.SurveyEngine.setEmbeddedData("LinkClicked",cnt);
jQuery('#NextButton').attr('disabled',false)
});
});
https://www.qualtrics.com/community/discussion/comment/29038#Comment_29038Thank you very much, it works!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.