When analytics is desired, you must pass a valid analytics config object with analytics and the config should contain a valid key.
constplayerConfig = { 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.
constsourceConfig = { // 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.
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.
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.
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.