This is from the guide on timing questions: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/question-types-guide/advanced/timing/
Delay showing submit button
You can use this option to hide the next button for a certain number of seconds, preventing respondents from progressing through the survey. After enabling this option, a Display “submit” after (seconds) option will appear where you can determine how long a respondent must be on a page before the next button appears. This counter resets if the respondent exits and reopens the survey or navigates to a different page and then returns to this page.
Although I’m sure that there a ways a respondent can get around that, which may be where JavaScript could help.
Maybe add a verification type question after the video? Something to sign off saying they watched the video or ask a question to verify they watched the video?
Trying to think of another way to verify.
I have not tried in a three years, but back in 2022 I looked far and wide for a solution. I ended up setting the timer to about 70% to 80% (depending on the video) of the video length at the point where the viewer could answer the question if they followed along closely. I recommend using the shortest time possible, if your videos are of the intro-detailed-review format (like ours were). Back then, using the timer was the most I could do, I suppose as the ordinary HTML connection is session based and not continuous. Maybe some kind of javascript timer would make this possible but I was unable to find one.
This is from the guide on timing questions: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/question-types-guide/advanced/timing/
Delay showing submit button
You can use this option to hide the next button for a certain number of seconds, preventing respondents from progressing through the survey. After enabling this option, a Display “submit” after (seconds) option will appear where you can determine how long a respondent must be on a page before the next button appears. This counter resets if the respondent exits and reopens the survey or navigates to a different page and then returns to this page.
Although I’m sure that there a ways a respondent can get around that, which may be where JavaScript could help.
Maybe add a verification type question after the video? Something to sign off saying they watched the video or ask a question to verify they watched the video?
Trying to think of another way to verify.
Thank you! But unfortunately, is doesn’t work this way in practice--even with no JS on the page or question, if I switch from a browser app to a different app for X=3 seconds, and then return, it immediately shows the advance option :(
The x+3 timing approach won’t work. You want to base it on video events. The exact approach depends on the video player you using (html5, youtube, etc), but you want to use JS to disable the next button when the page loads and enable it when the video end event occurs. You may also need to use JS to disable seek (i.e,. fast forward) and pause the video when the window loses focus.
I’d be interested to see a YouTube example if you are aware of one.
I’d be interested to see a YouTube example if you are aware of one.
I don’t use YouTube myself, so I don’t have one. I think I’ve seen some posts regarding YouTube videos on the Community. The YouTube API reference is here.
Ok, I will look into the youtube API and circle back if I can create a suitable solution--but I also have questions that do NOT feature a video, where I would like the active timer to only count down if survey tab is active in the browser--might anyone have come across a solution to implementing this without resorting to a third-party (e.g. youtube) trigger?
Ok, I will look into the youtube API and circle back if I can create a suitable solution--but I also have questions that do NOT feature a video, where I would like the active timer to only count down if survey tab is active in the browser--might anyone have come across a solution to implementing this without resorting to a third-party (e.g. youtube) trigger?
See this.
Need to level up my game to integrate this with a Qualtrics timer… but thank you!!!
Ok, here it is, the definitive force watch youtube in Qualtrics (Tip of the hat to Google’s Gemini)
This will NOT stop if user opens a different tab, but at least it prevents them from skipping the video, and it will autoadvance once they have finished playing it.
You want to insert your video as an iframe; i.e. copy and paste the embed code provided by youtube on the video to be shown.
Autoplay can be blocled in some browsers, so while I have it activated here, I also enable limited control of the iframe--to do this at the end of the src url in your iframe, add the following text:
?autoplay=1&controls=0showinfo=0&loop=0&enablejsapi=1
and if your src already has a “?” in it, simply replace the “?” in my line above with “&”, like I did below:
<iframe src="https://www.youtube.com/embed/wXZNuwY_5-U?si=7mvu8E1QcDDkpoii&autoplay=1&controls=0showinfo=0&loop=0&enablejsapi=1"></iframe>
The above line is the ENTIRE survey question
autoplay=1 makes it autoplay
controls=0 and showinfo=0 prevent excessive options popping up in the iframe (users can pause and resume, but not fast forward or change resolution)
loop=0 prevents looping which would in-turn could be problematic, because we want the iframe to report the video having ended after it has been watched in its entirety.
enablejsapi=1 is MANDATORY as this allows the youtube player to pass along a “video ended” message to Qualtrics JavaScript
Finally, you only need to alter the onload JS to read as follows:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Hide the next button*/
this.hideNextButton();
/*Get the video element*/
var video = document.querySelector('iframe');
/*Function to check for video end*/
var videoEndListener = function(event) {
if (event.data === YT.PlayerState.ENDED) {
this.clickNextButton();
}
}.bind(this);
/*Load the YouTube IFrame Player API*/
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')t0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
/*When the API is ready, create the player and add the event listener*/
window.onYouTubeIframeAPIReady = function() {
var player = new YT.Player(video, {
events: {
'onStateChange': videoEndListener
}
});
};
});
Note that above, I used “.clickNextButton” to autoadvance, however you could alternatively use showNextButton if you want the user to advance to the next question as opposed to doing so automagically.