OTV Analytics Agent for Browsers Integration Guide
The otvaa-sdk-web-<version>-package.tgz contains a file called otvaa.js which is a minified build of the library containing the Agent and Wrapper along with the set of valid Activities. It exposes a otvaa global variable which provides the entry point for APIs.
Integrating the otvaa library
Include the otvaa library module in the HTML file:
<script src=”otvaa.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, and uses the player to automate some of the data collection. The agent API is for clients who do not use an Open TV Connect Player.
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