admin管理员组文章数量:1414605
I am looking for a solution using javascript to record whether a user clicked on a link in qualtrics
I have followed these instructions - Javascript code to record click on link to PDF - Qualtrics but they no longer work
Another person had asked the same question but then went to adopt a different method (Tracking when an external link is clicked in Qualtrics?)
Any thoughts on how to get it working?
I am looking for a solution using javascript to record whether a user clicked on a link in qualtrics
I have followed these instructions - Javascript code to record click on link to PDF - Qualtrics but they no longer work
Another person had asked the same question but then went to adopt a different method (Tracking when an external link is clicked in Qualtrics?)
Any thoughts on how to get it working?
Share Improve this question edited May 23, 2017 at 12:08 CommunityBot 11 silver badge asked Jul 6, 2016 at 13:15 JohnJohn 131 silver badge3 bronze badges1 Answer
Reset to default 4Excuse my bluntness, but the problem with the previous questions on this subject were the OPs inability to follow directions rather than the answers given. Here it is one more time:
1) Add the embedded variable to your survey flow before the question block:
clicked = 0
2) Add the link to your question text (in HTML mode):
This is a link: <a href="http://www.google." target="_blank" id="extLink">Click here</a>
3) Add the following JavaScript to your question where "extLink" matches the id of your link in (2) and "clicked" matches the embedded variable in (1).
Qualtrics.SurveyEngine.addOnload(function() {
$('extLink').on('click', function(name, event) {
Qualtrics.SurveyEngine.setEmbeddedData('clicked', '1');
});
});
If it doesn't work, you are doing something wrong. Here is a survey that shows it works: https://marketinview.qualtrics./jfe5/preview/SV_02JbXhz8qyHgv2d
Click on the next button (>>) on the first page to see the value of 'clicked' on the next page.
本文标签: Tracking when an external link is clicked in Qualtrics with javascriptStack Overflow
版权声明:本文标题:Tracking when an external link is clicked in Qualtrics with javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745202401a2647452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论