Class: AnalyticsPluginTemplate

AnalyticsPluginTemplate

This is an example class of a plugin that works with the Ooyala Analytics Framework.

AnalyticsPluginTemplate(framework)

Initialize an instance of the current class using the new keyword along with this constructor.
Parameters:
Name Type Description
framework object The Analytics Framework instance

Methods

getName() → {string}

[Required Function] Return the name of the plugin.
Returns:
The name of the plugin.
Type
string

getVersion() → {string}

[Required Function] Return the version string of the plugin.
Returns:
The version of the plugin.
Type
string

setPluginID(newID)

[Required Function] Set the plugin id given by the Analytics Framework when this plugin is registered.
Parameters:
Name Type Description
newID string The plugin id

setPluginID() → {string}

[Required Function] Returns the stored plugin id, given by the Analytics Framework.
Returns:
The pluginID assigned to this instance from the Analytics Framework.
Type
string

init()

[Required Function] Initialize the plugin with the given metadata.

setMetadata(metadata)

[Required Function] Set the metadata for this plugin.
Parameters:
Name Type Description
metadata object The metadata for this plugin

processEvent(eventName, params)

[Required Function] Process an event from the Analytics Framework, with the given parameters.
Parameters:
Name Type Description
eventName string Name of the event
params Array Array of parameters sent with the event

destroy()

[Required Function] Clean up this plugin so the garbage collector can clear it out.