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#
Option | Type | Description |
---|---|---|
category | string | A category name to group media analytics data. |
mediaId | string | Identifier for the media being played. |
url | string | URL to associate with the playback session. |
events | KwikPlayer.Player.Event[] | List of events to track (e.g., play , pause , ended ). |
interval | number | Time interval (in seconds) for periodic data capture (e.g., time updates). |
title | string | Media title for identification in analytics. |
userId | string | Identifier for the user consuming the media. |