Please add the given script by going to wp-admin -> wplms-> Footer -> Google Analytics Code :
<script>
jQuery(document).ready(function($){
$('.unit_content').on('unit_traverse',function(){
if ($('ul#attachments li').length){
alert('something');
$('ul#attachments li a').attr('target','_blank');
}
});
});
</script>