/bitmovin-player-web-analytics-comscore

Integration of the Bitmovin Video Player with ComScore

Primary LanguageTypeScriptMIT LicenseMIT

Bitmovin Video Player with the ComScore Analytics integration

Experimental Status MIT license

Installation

Via npm package: npm install --save bitmovin-player-analytics-comscore

or add bitmovinplayer-analytics-comscore.js directly.

// Include a ComScore SDK from your ComScore dashboard before the Bitmovin plugin. The current version of this integration supports Comscore SDK version `7.5.0.200713`. Generally this file is called comscore.js.
<script src='comscore.js'></script>

// Bitmovin CDN version
<script src="//bitmovin-a.akamaihd.net/bitmovin-analytics-comscore/stable/comscore-plugin.min.js"></script>

// or your own local copy
<script src="/local/path/comscore-plugin.min.js"></script>

Usage

  1. Setup basic analytics reporting
  // Start ComScoreAnalytics app tracking
  bitmovin.player.analytics.ComScoreAnalytics.start({
    publisherId: 'YOUR_PUBLISHER_ID',
    applicationName: 'YOUR_APPLICATION_NAME',
    applicationVersion: 'YOUR_APPLICATION_VERSION',
  });

  bitmovin.player.analytics.ComScoreAnalytics.enterForeground();

  // Create ComScoreStreamingAnalytics
  var comscoreStreamingAnalytics = bitmovin.player.analytics.ComScoreAnalytics.createComScoreStreamingAnalytics(player, {
      mediaType: bitmovin.player.analytics.LongFormOnDemand,
      publisherBrandName: 'ABC',
      programTitle: 'Modern Family',
      episodeTitle: 'Rash Decisions',
      episodeSeasonNumber: '01',
      episodeNumber: '2',
      contentGenre: 'Comedy',
      stationTitle: 'Hulu',
      completeEpisode: true,
    },
  );
  
  //Update metadata for your new source load
  comscoreStreamingAnalytics.updateMetadata({
        mediaType: bitmovin.player.analytics.LongFormOnDemand,
        publisherBrandName: 'ABC',
        programTitle: 'Modern Family',
        episodeTitle: 'Rash Decisions',
        episodeSeasonNumber: '01',
        episodeNumber: '2',
        contentGenre: 'Comedy',
        stationTitle: 'Hulu',
        completeEpisode: true,
  })

Development

  1. Run tasks:
  • npm run lint to lint TypeScript files
  • npm run build to build project into dist directory
  • npm run start to open test page in browser, build and reload changed files automatically