Hidden question traps for bots | XM Community
Skip to main content
Solved

Hidden question traps for bots


LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
Our data quality guru recently asked me about creating "honey pot" questions to help catch bots. These are questions that are "hidden" to respondents but will be picked up by bots. I use the auto-punch next to hide questions. Any thoughts on creating questions only bots would get are welcome!

Best answer by LibertyW

Apparently @TomG discussed this elsewhere - https://www.qualtrics.com/community/discussion/1623/deleted I think you want to use JavaScript and not CSS (since bots may be smart enough to determine is something is hidden via CSS), and you want to hide the entire question (and the separator before it). So use the JavaScript below for any question you don't want real respondents to answer, but you want bots to answer. Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).prev('.Separator').hide(); jQuery("#"+this.questionId).hide(); }); Make sure you don't force response on any of these questions. Ideally, you'll put them in their own block. Then in the survey flow immediately following the block, terminate (and probably screen out) any respondents who answered the questions.
View original

10 replies

VirginiaM
Level 4 ●●●●
Forum|alt.badge.img+49
  • Level 4 ●●●●
  • 183 replies
  • September 19, 2019
What do you mean by "I use the auto-punch next to hide questions."? I don't know how to do this but would like to!

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Author
  • Level 3 ●●●
  • 95 replies
  • September 19, 2019
> @VirginiaM said: > What do you mean by "I use the auto-punch next to hide questions."? I don't know how to do this but would like to! > There is a thread on this somewhere but here is the JS for it :) Qualtrics.SurveyEngine.addOnload(function() { this.questionContainer.hide(); $('NextButton').click(); });

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5935 replies
  • September 19, 2019
It really doesn't need to be on its own page. You can put it on the same page with a real question and just hide it. If you want to stick with clicking the Next button, you should change addOnload to addOnReady (the timing of Qualtrics changed a while back and the NextButton won't be found using addOnload). I also recommend moving away from prototype.js so use one of these instead: ``` this.clickNextButton(); ``` or ``` jQuery("#NextButton").click(); ```

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Author
  • Level 3 ●●●
  • 95 replies
  • September 19, 2019
> @TomG said: > It really doesn't need to be on its own page. You can put it on the same page with a real question and just hide it. > > If you want to stick with clicking the Next button, you should change addOnload to addOnReady (the timing of Qualtrics changed a while back and the NextButton won't be found using addOnload). I also recommend moving away from prototype.js so use one of these instead: > ``` > this.clickNextButton(); > ``` > or > ``` > jQuery("#NextButton").click(); > ``` Thanks Tom for the upgraded info. The question remains however of how to create these "hidden" questions only bots can see? Just auto-punching next and putting "preview" display logic won't work :(

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Author
  • Level 3 ●●●
  • 95 replies
  • Answer
  • September 19, 2019
Apparently @TomG discussed this elsewhere - https://www.qualtrics.com/community/discussion/1623/deleted I think you want to use JavaScript and not CSS (since bots may be smart enough to determine is something is hidden via CSS), and you want to hide the entire question (and the separator before it). So use the JavaScript below for any question you don't want real respondents to answer, but you want bots to answer. Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).prev('.Separator').hide(); jQuery("#"+this.questionId).hide(); }); Make sure you don't force response on any of these questions. Ideally, you'll put them in their own block. Then in the survey flow immediately following the block, terminate (and probably screen out) any respondents who answered the questions.

  • 3 replies
  • February 10, 2020
It worked for me- thanks!

MattiasM
Level 5 ●●●●●
Forum|alt.badge.img+63
  • Level 5 ●●●●●
  • 328 replies
  • December 13, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/17989#Comment_17989Thanks! This answered a question I had today. Lovely and thanks for this!


Forum|alt.badge.img+2
  • Level 1 ●
  • 10 replies
  • February 6, 2024

@MattiasM your linked question doesn’t pertain to this original topic. Did you find a recent solution to include an honeypot style question not viewable to participants?


MattiasM
Level 5 ●●●●●
Forum|alt.badge.img+63
  • Level 5 ●●●●●
  • 328 replies
  • February 6, 2024
kgittner wrote:

@MattiasM your linked question doesn’t pertain to this original topic. Did you find a recent solution to include an honeypot style question not viewable to participants?

No I did not. Could have been me not doing it right though. :)


Forum|alt.badge.img+10
  • Level 2 ●●
  • 14 replies
  • April 1, 2025
LibertyW wrote:

Apparently @TomG discussed this elsewhere - https://www.qualtrics.com/community/discussion/1623/deleted I think you want to use JavaScript and not CSS (since bots may be smart enough to determine is something is hidden via CSS), and you want to hide the entire question (and the separator before it). So use the JavaScript below for any question you don't want real respondents to answer, but you want bots to answer. Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).prev('.Separator').hide(); jQuery("#"+this.questionId).hide(); }); Make sure you don't force response on any of these questions. Ideally, you'll put them in their own block. Then in the survey flow immediately following the block, terminate (and probably screen out) any respondents who answered the questions.

Do the actual question text or question type matter in terms of how effective this is? Or no, because a bot will respond to anything that’s answerable?


Leave a Reply