
TomG
I'm very new to Qualtrics and Javascript, and have tried to implement your Javascript code, so please excuse the silly sounding question.
Where does the result of the embedded variable get stored after the respondent submits their survey responses?
I do not seem to find anywhere in their individual report that shows the "clicked" variable.
Should it be there and have I perhaps not implemented your solution correctly?
tennysonwu - Did you define "clicked" in the survey flow prior to the block that contains the link?
Hi again TomG
Thanks for getting back to me so quickly. I think I defined "clicked" prior. (I called it "clicked1" since I plan on tracking several links out of my survey).
Question 7 is where I have my link:I have included the "clicked" variable in question 6 just before question 7:
and I have also included the same variable in the last question of the previous block of questions:
What am I doing wrong?
Thanks again for your help
Tennyson
Your jQuery selector is wrong. It isn't the url. Give the link an id in your html:
Link text
Then your jQuery is:
jQuery("#click1").click( ...
Also, you need to define the embedded data field 'click1' in the Survey Flow, not in JS.
Hi there TomG
I'm trying to use the code to count when a respondent clicks a hyperlink within my qualtrics survey, but it doesn't seem to be working. I'm not sure what I'm doing wrong?
I've included three screen shots from the survey below. The first is the JS for the question that contains the hyperlink I want to count the clicks on, the second is the HTML for the question that contains the hyperlink, and the third is the embedded data identifying the variable clicked.
I appreciate any help you might be able to offer - I'm sure it's something super simple that I'm overlooking.
thanks in advance
Alison
The original code is perfect for one link, but is there a way to do this in a scenario in which I want to provide the respondent multiple link options, all of which they can click without getting bumped off the page? With the original code, as soon as a respondent clicks one of the links, the survey automatically goes to the next page, so the respondent can't explore the other link options.
https://www.qualtrics.com/community/discussion/comment/33411#Comment_33411Remove the line in the script that clicks the Next button.
That solved it! Thank you so much!
TomG
Dear Tom,
I already looked at all the comments you gave until now and really tried to solve the problem myself. Unfortunately, I always receive "clicked1=0" in the outcome of my data. I put the Embedded data on top of the survey flow.
Could you maybe tell me what is wrong? I would be super thankful!
Until now I did the following steps:
It should be:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#clicked1").click(function(event) {
Qualtrics.SurveyEngine.setEmbeddedData("clicked1","1");
});
});
TomG
Thank you for your answer, unfortunately, it still shows me clicked1:0, even if the respondent clicks on the link. Is there anything else I can do?
Katha TomG
I am also experiencing this problem--regardless of whether I click the link or not it always shows as "0" in my SPSS data file of output--and was wondering whether either of you had figured out how to fix it. Screenshots of what I have done are shown below. Thanks in advance!
https://www.qualtrics.com/community/discussion/comment/37011#Comment_37011You have your addOnload function inside your addOnload function. Remove one of them.
TomG
Thanks so much for the quick reply! I fixed that issue (I think--see below), but still am getting all 0s in my output regardless of whether I clicked the link.
Is it possible to track if people click an URL link even when this link is inserted at the End of the Survey page and not in an actual Block of the Qualitrics survey?
Hi TomG
Just been reading this thread with interest as I wanted to replicate this but for the end of survey message. Do you think this is feasible?
Thanks
Rod Pestell
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.