If you need to track start, 25% and 50% and 75% processes and end events of a Kaltura video player via GTM, create a GTM tag and paste the following script there:
<script>
var script = document.createElement('script');
script.onload = function () {
if ( typeof kWidget !== 'undefined' && kWidget !== null ) {
kWidget.addReadyCallback(function(playerId){
var kdp=document.getElementById(playerId);
kdp.kBind('firstPlay.fp',function(){
gtag('event', 'kaltura video player', {
'event_category' : 'video start'
});
kdp.kUnbind('.fp');
});
kdp.kBind('firstQuartile.1q',function(){
gtag('event', 'kaltura video player', {
'event_category' : 'video progress 25%'
});
kdp.kUnbind('.1q');
});
kdp.kBind('secondQuartile.2q',function(){
gtag('event', 'kaltura video player', {
'event_category' : 'video progress 50%'
});
kdp.kUnbind('.2q');
});
kdp.kBind('thirdQuartile.3q',function(){
gtag('event', 'kaltura video player', {
'event_category' : 'video progress 75%'
});
kdp.kUnbind('.3q');
});
kdp.kBind('playerPlayEnd.pe',function() {
gtag('event', 'kaltura video player', {
'event_category' : 'video end'
});
kdp.kUnbind('.pe');
});
});
}
};
script.src = 'http://cdnapi.kaltura.com/p/{partner_id}/sp/{partnerId}00/embedIframeJs/uiconf_id/{uiconf_id}/partner_id/{partnerId}';
document.head.appendChild(script);
</script>
Replace {partnerId} and {uiconf_id} with the partner ID and uiconf ID of the video player account.