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

daniel_navarrodaniel_navarro BarcelonaCommunity Member Qubie ✭

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.

Tagged:

Best Answer

  • TomGTomG Raleigh, NC Wizard ✭✭✭✭✭
    Accepted Answer

    @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();
        });
    });
    

Answers

  • MsIreenMsIreen FinlandCommunity Member, Product Ideas Superuser ✭✭✭✭

    @daniel_navarro Did you put the embedded data in the survey flow in the very beginning?

  • daniel_navarrodaniel_navarro BarcelonaCommunity Member Qubie ✭

    @TomG ,
    Thanks a lot. Do you mean I need to put the codes above as Javascript of the descriptive text in Qualtrics? And after I attach the new code, the qualtrics page will go to next page automatically after the link is clicked?

  • TomGTomG Raleigh, NCCommunity Member, Product Ideas Wizard ✭✭✭✭✭

    @daniel_navarro said:
    @TomG ,
    Thanks a lot. Do you mean I need to put the codes above as Javascript of the descriptive text in Qualtrics? And after I attach the new code, the qualtrics page will go to next page automatically after the link is clicked?

    Yes and yes

Sign In to Comment