Add the JavaScript tracking snippet to your page before your closing
tag.
<!-- DVIDS Video Analytics -->
<script async src='https://cdn.dvidshub.net/js/DVIDSVideoAnalytics.min.js'></script>
<!-- End DVIDS Video Analytics -->
Track events with:
DVIDSVideoAnalytics.track(name, properties);
loaded: When video is initially loaded upon page load.
play: Specific document id to retrieve for search. Example: "image:123456". Required.
ended: Video has ended
Example for videojs on play event:
var analyticsParams = {
domain: 'www.dvidshub.net',
type_id: 762044,
type:'video',
original_referrer: '',
unit: 1587
}
DVIDSVideoAnalytics.track('play', analyticsParams);