Interface MKAnalyticsConfig

Analytics configuration interface.

When analytics is desired, you must pass a valid analytics config object with analytics and the config should contain a valid key.

const playerConfig = {
key: "<YOUR PLAYER KEY>",
analytics: {
key: "<YOUR ANALYTICS KEY>",
userId: "<USER IDENTIFIER>",
experimentName: "Analytics Test",
// any other analytics config properties...
}
}

Later on at the time of calling load in the analytics you can update the analytics config with source specific properties and load the source for this data to reflect in the analytics.

const sourceConfig = {
// same analytics config object as used in player config
// or a new one without player key but other necessary
// properties applicable for this source
analytics: {
videoId: "<SOURCE VIDEO ID>",
// any other analytics config properties...
}
}

Finally when load with source config as above is called, the analytics data will be published to the analytics endpoint provided the config and keys are valid.

Please note that appropriate domains must be whitelisted agains the player and analytics license for this to work correctly.

Hierarchy

  • MKAnalyticsConfig

Properties

cdnProvider?: string
customData1?: string
customData10?: string
customData11?: string
customData12?: string
customData13?: string
customData14?: string
customData15?: string
customData16?: string
customData17?: string
customData18?: string
customData19?: string
customData2?: string
customData20?: string
customData21?: string
customData22?: string
customData23?: string
customData24?: string
customData25?: string
customData26?: string
customData27?: string
customData28?: string
customData29?: string
customData3?: string
customData30?: string
customData4?: string
customData5?: string
customData6?: string
customData7?: string
customData8?: string
customData9?: string
experimentName?: string
isLive?: boolean
key?: string

Analytics license key.

Without this key analytics collecter will not be enabled.

player?: string
playerKey?: string
title?: string
userId?: string
videoId?: string