https://community.qualtrics.com/XMcommunity/discussion/comment/38615#Comment_38615Thank you Rahul. But it still doesn't work. Qualtrics is showing "0" even when people click on the link. :(
https://community.qualtrics.com/XMcommunity/discussion/comment/38598#Comment_38598Thanks for the quick reply! Is it possible for you to copy my full code and edit it and post it here for me to better understand where to fit it? I think I might be getting confused about it's placement.
https://community.qualtrics.com/XMcommunity/discussion/comment/38577#Comment_38577Hello. I tried it and unfortunately it did not work. This is what my code looks like: Where am I going wrong? It still shows "0" for both links even though one of them was surely clicked.Qualtrics.SurveyEngine.addOnload(function(){ jQuery("#extLink").click(function(event) { Qualtrics.SurveyEngine.setEmbeddedData("t2.sharedvaccine", "1"); });});Qualtrics.SurveyEngine.addOnReady(function(){ var qobj2 = this; qobj2.hideNextButton(); jQuery("#extLink").click(function(event) { qobj2.clickNextButton(); if(jQuery('#extLink').data('clicked', true)){//Code to check console if inside and then click next button} });});Qualtrics.SurveyEngine.addOnUnload(function(){ /*Place your JavaScript here to run when the page is unloaded*/});
https://community.qualtrics.com/XMcommunity/discussion/comment/38577#Comment_38577Do I replace any part of the original code with this or add this to the original code?
https://community.qualtrics.com/discussion/comment/38541#Comment_38541HelloUsing your code I have been able to make the hide.Next Button and the click.Next Button commands work. Thanks.But now Qualtrics isn't recording "1" for participants who clicked on the link. In fact, irrespective of whether people clicked or not, I get a value of "0" when I export the data (my embedded variable t2.shared has set value to 0).This is important for me because I have two links to be clicked. On the same page, there are two questions, each with a link. I am asking participants to click on any one of the two. I want Qualtrics to tell me which link they clicked on. Here is what I have so far in the code:
HelloUsing your code I have been able to make the hide.Next Button and the click.Next Button commands work. Thanks.But now Qualtrics isn't recording "1" for participants who clicked on the link. In fact, irrespective of whether people clicked or not, I get a value of "0" when I export the data. How can I fix that?
Thanks, I will just try this. When I add "timestamp" as a variable, do I set a value for it?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.