Solved
Track whether a link is clicked in qualtrics even a respondent leaves for the opened new page

Dear all:
I have a question. In my survey, I have an external link inserted. I want a value of 1 is recorded if the link is clicked; otherwise a value of 0 is recorded. I followed a instruction given on a website: https://stackoverflow.com/questions/38225021/tracking-when-an-external-link-is-clicked-in-qualtrics-with-javascript. It works very well if a respondent's response is recorded as complete. But suppose a respondent clicks the link and then leaves for the new page and never comes back, then his response is recorded as response in progress. And when I check his response, a value of 0 is recorded even though he clicks the link. Is there a way to deal with this? Thanks.
Best answer by TomG
@daniel_navarro,
I'm the author of the Stackoverflow post you cited. Embedded variables don't get saved on the Qualtrics server until the page is submitted. So, you just need to add a line to the script to click the Next Button. I've updated it to use jQuery instead of prototypejs:
```
Qualtrics.SurveyEngine.addOnload(function() {
jQuery('#extLink').click(function(event) {
Qualtrics.SurveyEngine.setEmbeddedData("clicked", "1");
jQuery("#NextButton").click();
});
});
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.