Recording of analytics to Google using event tracking. See this guide

Methods

AnalyticsGoogle(di)

Item Value
Scope Constructor
Returns Video

Parameters

Parameter Description
Object di DI object

Constructor for the google analytics plugin.
Sets up listeners for events loadstart, timeupdate, nextVideo, previousVideo. Each page with an embedded Akita player will create the following google tracking events.

Item Category Action Label
Page load Videos PlayerLoaded video-id
Video play Videos PlaybackStarted and the n%Watched in 5% increments from 0-100 video-id

This plugin queues events to be tracking in a global variable called _gaq.

_gaq.push(['_trackEvent', `category`, 'action', 'label']);

If this variable does not exist, one is created by this plugin.


Events

analyticsGooglePluginInitialised

Fired on plugin being initialised


analyticsGooglePluginReady

Fired on plugin being ready to interact with