Hi! I've searched for custom code to get the information from replay video and I couldn't find an exact answer.
(I've tried both of these:
https://community.qualtrics.com/XMcommunity/discussion/2832/how-to-record-how-many-times-a-participant-has-replayed-a-video
https://stackoverflow.com/questions/48492796/javascript-to-track-how-many-times-an-audio-video-file-is-played-in-qualtrics)
I've embedded a mp4 video in my survey and I want to check how many times the participant has clicked play on the video. Is there a way to record how many times they hit play?
Thank you!
Page 1 / 1
Just set an embedded/ increment the value whenever the respondent clicks on play button.
example:
if(jQuery('#QID17 a').data('clicked', false))
{
errCnt+=1;
console.log(errCnt)
}
var vid = document.getElementById("audi_player");
var i=0;
vid.onplaying = function() {
i=1;
var actual_click=i;
//console.log("played"+ i)
//alert("The video is now playing");
Qualtrics.SurveyEngine.setEmbeddedData('Q1_click',actual_click)
};
Thank you!
Do you put this code in the html or java?
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.