a. Go to WP Admin – WPLMS – Footer – Google Analytics code.
b. Paste the following code :
<script>
jQuery(document).ready(function($){
$('.unit_content').find('audio,video').each(function(){
if(typeof this.player !== "undefined"){
if(!$('#mark-complete').hasClass('tip')){return;}
var _player = this.player;
old = _player.media.setCurrentTime;
_player.media.setCurrentTime = function(time) {
if(time <= this.currentTime){
old.apply(this,[time]);
}
};
}
});
$(document).on('media_loaded','#mark-complete',function(){
$('.unit_content').find('audio,video').each(function(){
if(typeof this.player !== "undefined"){
if(!$('#mark-complete').hasClass('tip')){return;}
var _player = this.player;
old = _player.media.setCurrentTime;
_player.media.setCurrentTime = function(time) {
if(time <= this.currentTime){
old.apply(this,[time]);
}
};
}
});
});
});
</script>
result :
