Video Analytics API

Add the JavaScript tracking snippet to your page before your closing tag.

<!-- DVIDS Video Analytics -->
<script async src=''></script>
<!-- End DVIDS Video Analytics -->


Track events with:

DVIDSVideoAnalytics.track(name, properties);

Event names:

  • 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

Event properties:

  • domain (required): The domain of the site the video is loaded on (ex.
  • original_referrer: If you would like to provide the original referrer for the video landing page, provide it here.
  • type (required): Acceptable values: 'video' or 'webcast'.
  • type_id (required): The ID of the video or webcast being played from DVIDS.
  • unit: The unit ID the video belongs to.

Example for videojs on play event:

var analyticsParams = {
    domain: '',
    type_id: 762044,
    original_referrer: '',
    unit: 1587

DVIDSVideoAnalytics.track('play', analyticsParams);