Analytics for videojs

This commit is contained in:
2017-02-08 16:27:52 +01:00
parent 02f736dcc4
commit 0a86ad357f
3 changed files with 18 additions and 1 deletions

View File

@@ -132,7 +132,17 @@
script(type="text/javascript").
{% if node.video_sources %}
videojs(document.getElementById('videoplayer'), { fluid: true });
videojs(document.getElementById('videoplayer'), {
fluid: true
},
function(){
this.ga({
'eventLabel' : '{{ node._id }} - {{ node.name }}',
'eventCategory' : '{{ node.project }}',
'eventsToTrack' : ['start', 'error', 'percentsPlayed']
});
}
);
{% endif %}
$(function(){