Analytics for videojs
This commit is contained in:
@@ -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(){
|
||||
|
@@ -72,6 +72,7 @@ link(rel="amphtml", href="{{ url_for('nodes.view', node_id=node._id, _external=T
|
||||
| {% endif %}
|
||||
|
||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/videojs-5.8.8.min.js', v=6220171) }}")
|
||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/videojs-ga-0.4.2.min.js', v=6220171) }}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block css %}
|
||||
|
Reference in New Issue
Block a user