Edit in JSFiddle

<script>
(function(){
var i = 0;
// Define at which percentages you want to fire an event
var markers = [1,2,3,4,5,10,25,50,70,75,90];
var playersMarkers = [];

function findObjectIndexById(haystack, key, needle) {
    for (var i = 0; i < haystack.length; i++) {
        if (haystack[i][key] == needle) {
            return i;
        }
    }
    return null;
}

while (true) {
    var player = jwplayer(i);
    if (!player.id)
        break;
    
    playersMarkers.push({
      'id': player.id,
      'markers': []
    }); 

    player.onPlay(
        function(e){
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "Play",
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });   
        }
    );
  
    player.onComplete(
      function(e){
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "Complete",
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });            
      }
    );
  
    player.onPause(
      function(e){
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "Pause",
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });   
      }
    );

    player.onError(
      function(e){
            dataLayer.push({
                "event": "videoError",
                "player_id": this.id,
                "interaction": e.message,
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });   
      }
    );
    
    player.onFullscreen(
      function(e){
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "FullScreen " + (e.fullscreen ? "On" : "Off"),
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });   
      }
    );  

    player.onMute(
      function(e){
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "Mute " + (e.mute ? "On" : "Off"),
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });             
      });

    player.onTime(
      function(e){
        var percentPlayed = Math.floor(e.position*100/e.duration);
        var playerMarkerIndex = findObjectIndexById(playersMarkers,'id',this.id);
        
        if(markers.indexOf(percentPlayed)>-1 && playersMarkers[playerMarkerIndex].markers.indexOf(percentPlayed)==-1)
        {          
            playersMarkers[playerMarkerIndex].markers.push(percentPlayed);      
            dataLayer.push({
                "event": "video",
                "player_id": this.id,
                "interaction": "Progress " + percentPlayed + "%",
                "video_url": this.getPlaylistItem().file,
                "duration": this.getDuration(),
                "width": this.getWidth(),
                "height": this.getHeight(),
                "position": this.getPosition(),
                "resolutions": [].map.call(this.getQualityLevels(), function(obj) {  return obj.label;}),
                "volume": this.getVolume(),
                "player_type": this.renderingMode
            });               
        }       
      }
    );  
    i++;
}    
})();
</script>