Nagra OTV Analytics Javascript Agent

Class: OtvAnalyticsAgent

OtvAnalyticsAgent

new OtvAnalyticsAgent()

This class is the main entry point for the OpenTv Analytics Agent.

Note: There is no need for the integrator to call new on this class as it handled internally to the SDK.

Methods

appStart(metadata)

Submit the appStart Activity. Must be the first activity submitted (must be called before any other calls to submitActivity). Should not be called again without first submitting an appStop activity.

Name Type Description
metadata Object

Containing key-value pairs of metadata for the appStart activity

Returns:
error object

close()

Close the analytics session. After calling this method, do not call any other unless initialise is called again.

Returns:
error object

initialise(configuration)

Initialise the OpenTv Analytics Agent. Call this method once, before calling any other. Do not call again unless close is called first.

Name Type Description
configuration Object
Returns:
error object

submitActivity(activity, metadata)

Submit an activity.

appStart activity should not be submitted using this method

Name Type Description
activity OtvActivity

The activity being submitted

metadata Obect

Containing key-value pairs of metadata for the submitted activity

Returns:
error object

updateConfig(configuration)

Provide an updated configuration. The configuration object should only contain the updated attributes. Not all attributes may be updated.

Name Type Description
configuration object
Returns:
error object