Recording of analytics

Methods

Analytics(di)

Item Value
Scope Constructor
Returns Video

Parameters

Parameter Description
Object di DI object

Constructor for the analytics plugin. Has event listeners for each event that it wants to track.


Properties

trackedEvents

Item Value
Scope public
Returns Array

events already sent

[
    {
        eventName: 'play',
        eventData: {
            video_id: '13213'
        },
        timestamp: 1381290423
    },
    {
        eventName: 'duration',
        eventData: {
            video_id: '13213',
            percentage: 10,
            currentTime: 6
        },
        timestamp: 1381290423
    }
]

Events

analyticsPluginInitialised

Fired on plugin being initialised


analyticsPluginReady

Fired on plugin being ready to interact with


sent

Fired on every analytics event that has been tracked

{
    data: {
        eventName: 'play',
        eventData: {
            video_id: '13213'
        },
        timestamp: 1381290423
    }
}