Hidden question traps for bots | XM Community
Solved

Hidden question traps for bots

  • 19 September 2019
  • 9 replies
  • 1732 views

Userlevel 4
Badge +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!
icon

Best answer by LibertyW 20 September 2019, 00:32

View original

9 replies

Userlevel 6
Badge +45
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!
Userlevel 4
Badge +5
> @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();
});
Userlevel 7
Badge +27
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();
```
Userlevel 4
Badge +5
> @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 😞
Userlevel 4
Badge +5
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.
It worked for me- thanks!
Userlevel 7
Badge +61

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

Badge +1

@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?

Userlevel 7
Badge +61

@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. :)

Leave a Reply