How to record whether participants copy&paste for the open-ended questions? | Experience Community
Skip to main content
Solved

How to record whether participants copy&paste for the open-ended questions?

  • March 15, 2026
  • 3 replies
  • 32 views

Forum|alt.badge.img

Hi everyone! I would like to collect some qualitative data (open-ended responses). Considering participants’ potential use of AI, we would like to use some code so that we can track whether participants use copy and paste for their answers? We are not trying to prevent participants from using copy and paste. Instead, we just would like to know whether participants use copy and paste or not!

Thank you so much!

Best answer by vgayraud

Hi,

Add an embedded data at the top of your survey flow and this custom script to your question.

Qualtrics.SurveyEngine.addOnload(function () {

var questionId = this.questionId;
var textArea = document.querySelector('#question-' + questionId + ' textarea') || document.querySelector('#' + questionId + ' textarea');
var pasteDetected = false;

if (textArea) {

function handleExternalInput(event) {
if ((event.type === 'paste' || event.type === 'drop') && (!pasteDetected)) {
pasteDetected = true;
Qualtrics.SurveyEngine.setJSEmbeddedData('pasteUsed', pasteDetected);
}
}

textArea.addEventListener('paste', handleExternalInput);
textArea.addEventListener('drop', handleExternalInput);
}

});

If you need to differentiate it for multiple questions, just create more ED fields and adapt the script.

3 replies

pamelalbeck
Level 5 ●●●●●
Forum|alt.badge.img+37
  • Level 5 ●●●●●
  • March 16, 2026

Oh wow ​@SSyaohhh, great topic!  I don’t suspect many of the student responses I get are AI due to the length, but I do think many take the surveys on their phones due to the typos.  Interested to see how other users respond though.


vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+62
  • QPN Level 7 ●●●●●●●
  • Answer
  • March 17, 2026

Hi,

Add an embedded data at the top of your survey flow and this custom script to your question.

Qualtrics.SurveyEngine.addOnload(function () {

var questionId = this.questionId;
var textArea = document.querySelector('#question-' + questionId + ' textarea') || document.querySelector('#' + questionId + ' textarea');
var pasteDetected = false;

if (textArea) {

function handleExternalInput(event) {
if ((event.type === 'paste' || event.type === 'drop') && (!pasteDetected)) {
pasteDetected = true;
Qualtrics.SurveyEngine.setJSEmbeddedData('pasteUsed', pasteDetected);
}
}

textArea.addEventListener('paste', handleExternalInput);
textArea.addEventListener('drop', handleExternalInput);
}

});

If you need to differentiate it for multiple questions, just create more ED fields and adapt the script.


Forum|alt.badge.img
  • Author
  • March 17, 2026

@vgayraud Thank you so much!