Skip to main content
Skip table of contents

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:

HTML
<script src=”otvaa.js”></script>

The otvaa library contains two different API for submitting analytics data:

  • otvaa.agent

  • otvaa.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.

Using the OTVAA Agent API

Using the OTVAA Wrapper API

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.PlaybackStart

  • otvaa.OtvActivity.PlaybackStop

  • otvaa.OtvActivity.PlaybackPause

  • otvaa.OtvActivity.PlaybackResume

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.