Track whether a file is downloaded in qualtrics | Experience Community
Skip to main content
Solved

Track whether a file is downloaded in qualtrics

  • Mar 8, 2021 5:42 PM UTC
  • 12 replies
  • 582 views

I have uploaded a word document to a survey and am hoping to track which survey takers down the document. I have used a previous thread about tracking whether a link is clicked to get started. I created an embedded variable, "download", and set it equal to "0". Then I used some javascript provided in this post: https://www.qualtrics.com/community/discussion/2809/track-whether-a-link-is-clicked-in-qualtrics-even-a-respondent-leaves-for-the-opened-new-page. I can tell that the issue is with the JQuery link since it uses a #extLink. However, I am not sure what to use here for a downloaded file. Any help would be appreciated.

Qualtrics.SurveyEngine.addOnload(function() {
  jQuery('#extLink').click(function(event) {
    Qualtrics.SurveyEngine.setEmbeddedData("download", "1");
  });

Best answer by ahmedA

Change it to this:
If you are interested in learning more about covid-19 vaccine availability and would like to schedule an appointment please download the full document by clicking on the following text link: Covid 19 Vaccine Resources - Pennsylvania
Now when someone clicks on it, download should be set to 1.

View original

12 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Mar 8, 2021 6:14 PM UTC

How are you setting up the file download? Link? Button?
Share a screenshot of question HTML


  • Author
  • Mar 8, 2021 6:17 PM UTC

The file is downloaded by clicking on some of the highlighted text in the question.
Here is the HTML for the question:
If you are interested in learning more about covid-19 vaccine availability and would like to schedule an appointment please download the full document by clicking on the following text link: https://smeal.qualtrics.com/CP/File.php?F=F_3fkQ9Y7hp6JaWQ6" target="_blank">Covid 19 Vaccine Resources - Pennsylvania


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Answer
  • Mar 8, 2021 10:36 PM UTC

Change it to this:
If you are interested in learning more about covid-19 vaccine availability and would like to schedule an appointment please download the full document by clicking on the following text link: Covid 19 Vaccine Resources - Pennsylvania
Now when someone clicks on it, download should be set to 1.


  • Author
  • Mar 9, 2021 6:08 AM UTC

Forum|alt.badge.img+2
  • Level 2 ●●
  • Jun 25, 2023 4:12 AM UTC

@ahmedA I actually have the same question, but I don’t understand the solution. What was changed? What was changed in the javascript?


Forum|alt.badge.img+15
  • QPN Level 4 ●●●●
  • Jun 26, 2023 6:27 AM UTC

this is same as your other question @jevans6  😀


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • Jun 26, 2023 1:53 PM UTC

ahmedA original comment:


Change it to this:

​If you are interested in learning more about covid-19 vaccine availability and would like to schedule an appointment please download the full document by clicking on the following text link: <span style="font-size:22px;"><strong><a href="https://smeal.qualtrics.com/CP/File.php?F=F_3fkQ9Y7hp6JaWQ6" target="_blank" id="extLink">Covid 19 Vaccine Resources - Pennsylvania </a></strong></span>

Now when someone clicks on it, download should be set to 1.


Forum|alt.badge.img+2
  • Level 2 ●●
  • Jun 27, 2023 9:05 PM UTC

@Tom_1842 Thank you!


Forum|alt.badge.img+1
  • Level 1 ●
  • Jan 15, 2024 5:16 PM UTC

Hi, I’m trying to do the same thing, do you put this code in the javascript box? 


Forum|alt.badge.img+1
  • Level 1 ●
  • Jan 15, 2024 5:22 PM UTC

This is my current HTML code. 

Provided is a downloadable summary for working with gifted and talented youth:&nbsp;<a href="https://ucf.qualtrics.com//CP/File.php?F=F_038ZRLTKVM5zOl0" rel="noopener" target="_blank">Giftedhandout</a>&nbsp;

 

I am looking to track the number of downloads. I have tried support with zero luck. 


Forum|alt.badge.img+2
  • Level 2 ●●
  • Jan 16, 2024 2:48 AM UTC

Hi! So you basically need to do 3 steps. First, you need to add an embedded link in your survey (in survey flow) before question where you have your PDF that you’d like to track and set it equal to 0. Then you need to add the following in javascript:

Qualtrics.SurveyEngine.addOnload(function() {
  jQuery('#extLink').click(function(event) {
    Qualtrics.SurveyEngine.setEmbeddedData("extLink", "1");
  });

 

I’m not sure whether this is necessary, but I make sure the embedded link, and the “extLink” above have the same name. The third piece is adding the “extLink” name in the html with id=”extLink”, which you don’t seem to have above. I think I usually put the id before “target”. Similarly, I just have all of the steps with the same name, as I’m not 100% sure which links to which so it makes it easier.

 

I hope this helps!


Forum|alt.badge.img+1
  • Level 1 ●
  • Jan 19, 2024 3:28 AM UTC

@jevans6 Thank you so much for your reply. I clearly did something incorrectly. It still says zero after I tested it. I think there is something I am doing incorrectly in step one. It appears like I am just creating a name and setting it to 0 which doesn’t feel right. Any thoughts?