OpenTV Analytics Agent for Browsers Integration Guide
The otvaa-sdk-web-<version>-package.tgz contains a file for each of the supported Player integrations:
otvaa.connect.js
otvaa.bitmovin.js
These are minified builds of the library containing the Agent and Wrapper along with the set of valid Activities. They each expose a otvaa global variable which provides the entry point for APIs.
Integrating the otvaa library
Include the relevant OTVAA library module in the HTML file according the Player you use:
<script src=”otvaa.connect.js”></script>
<!-- or -->
<script src=”otvaa.bitmovin.js”></script>
The OTVAA library contains two different API for submitting analytics data:
otvaa.agentotvaa.wrapper
The wrapper API is for clients using the Open TV Connect Player or Bitmovin Player SDK, and uses that player to automate some of the data collection. The agent API is for clients who do not use either of the wrapper supported Players - nonetheless you should still include otvaa.connect.js in the HTML file.
A client application should use either the agent API, or the wrapper API, but not a mixture of the two.
The Activities can be prefixed with otvaa.OtvActivity.. For example:
otvaa.OtvActivity.PlaybackStartotvaa.OtvActivity.PlaybackStopotvaa.OtvActivity.PlaybackPauseotvaa.OtvActivity.PlaybackResume