Qualtrics.SurveyEngine.addOnload(function()
{
var timeStampOfOnLoad = new Date();
Qualtrics.SurveyEngine.setEmbeddedData('timeStampOfOnLoad_QID1', timeStampOfOnLoad);
//alert('QID1 '+timeStampOfOnLoad);
this.questionclick = function(event,element){
var timeStampOfAnswer = new Date();
Qualtrics.SurveyEngine.setEmbeddedData('timeStampOfAnswer_QID1', timeStampOfAnswer);
//alert('QID1 '+timeStampOfAnswer);
}
}
);
{
var timeStampOfOnLoad = new Date();
Qualtrics.SurveyEngine.setEmbeddedData('timeStampOfOnLoad_QID1', timeStampOfOnLoad);
//alert('QID1 '+timeStampOfOnLoad);
this.questionclick = function(event,element){
var timeStampOfAnswer = new Date();
Qualtrics.SurveyEngine.setEmbeddedData('timeStampOfAnswer_QID1', timeStampOfAnswer);
//alert('QID1 '+timeStampOfAnswer);
}
}
);
Find your question on Qualtrics and click on the let-hand button and choose "Add Javascript". Copy and paste the above code (in whole) and change the "QID" parameter to your question's ID.
You will also need to add an Embedded Data element to your survey flow with the same name as the value after the ".setEmbeddedData" function in the code (e.g., timeStampOfOnLoad_QID1 ). The first var in the code records the timestamp the question was viewable to the participants and the second one records the timestamp of the first click the participant made. If you want both, create two Embedded Data elements in your survey flow.