跟踪何时在Qualtrics中单击外部链接? [英] Tracking when an external link is clicked in Qualtrics?
问题描述
根据这些说明 - 要记录的Javascript代码点击链接到PDF - Qualtrics
Based on these instructions- Javascript code to record click on link to PDF - Qualtrics
我在问题中设置了链接(带有人的唯一ID),我将javascript添加到了javascript面板在问题中但我不确定将什么添加到调查流程部分。
I set up the link (with unique ID of human) in the question, I added the javascript to the javascript panel in the question but I am not sure what to add into the survey flow section.
这就是我现在所拥有的,它似乎不起作用:
This is what I have now and it doesn't seem to be working:
1 =人
谢谢
这是我需要跟踪的链接 -
Here is my link I need to track-
<a href="http://vpf2.cise.ufl.edu/Classic/Interaction/Prototype/23341" id="human" target="_blank">Test Link</a>
这是我提出的问题的javascript。
and here is the javascript I put with the question.
Qualtrics.SurveyEngine.addOnload(function()
{
var a = $("human"); //adjust ID here
a.onclick = function() {
Qualtrics.SurveyEngine.setEmbeddedData("clicked", 1); //adjust embedded data variable here
}
});
推荐答案
试试这个:
在调查流程中:
human = 0
问题html:
<a href="http://vpf2.cise.ufl.edu/Classic/Interaction/Prototype/22318?username=" id="human" target="_blank">Click here</a>
JavaScript:
JavaScript:
Qualtrics.SurveyEngine.addOnload(function()
{
$('human').observe('click',function(event) {
Qualtrics.SurveyEngine.setEmbeddedData("human", "1");
});
});
注意:在Qualtrics中,$指的是prototypejs,而不是jquery。
Note: In Qualtrics $ refers to prototypejs, not jquery.
这篇关于跟踪何时在Qualtrics中单击外部链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!