KWIK Analytics#

This module is a custom Video.js plugin that integrates with the Kwikstat analytics system to track player events and user interactions, such as playback, ads, and quality changes. It leverages the Piwik tracker, ensuring accurate reporting of video performance and user behavior.

Initialization#

To enable plugin need to add in following option:

window.initPlayer('my-video', {
  kwikAnalyticsPlugin: {
    category: 'player-v9',
    mediaId: 'id0',
    url: `${document.location.protocol === 'https:' ? 'https' : 'http'}://stat.kwikmotion.com/`,
    events: ['adserror', 'ads-ad-started', 'timeupdate', 'ended', 'loadedmetadata'],
    title: document.title,
    interval: 5,
    userId: 'user-test-id',
  }
})

Options#

OptionTypeDescription
categorystringA category name to group media analytics data.
mediaIdstringIdentifier for the media being played.
urlstringURL to associate with the playback session.
eventsKwikPlayer.Player.Event[]List of events to track (e.g., play, pause, ended).
intervalnumberTime interval (in seconds) for periodic data capture (e.g., time updates).
titlestringMedia title for identification in analytics.
userIdstringIdentifier for the user consuming the media.