Datazoom is a high-availability real-time data collection solution. This document summarizes how to integrate the Kaltura player with the Datazoom platform.
Login to Datazoom here: https://app.datazoom.io
Add a Collector as indicated here: How to add a Collector
Copy the
Config
that was created at the end of the process
Click the icon indicated below to copy the Configuration Key
Plugin Integration
Datazoom provides plugins for data collection through our Beacon Services. Integrate the Kaltura Player plugin into your web application with the following snippet:
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
Insert this JS line into your HTML
Replace the
CONFIG_ID
value with the collector configuration ID.
This inserts Datazoom's data collection SDK into the page.
Activate Data Collection for a Kaltura Player
To activate data collection for a Kaltura player instance, create a Datazoom context which references the player instance with the following snippet:
datazoom_context = datazoom.createContext(kalturaPlayer);
for example:
<!DOCTYPE html> <html lang="en"> <head> <script src="https://cdnapisec.kaltura.com/p/XXXXXX/sp/XXXXXX/embedIframeJs/uiconf_id/XXXXXX/partner_id/XXXXXX"></script> <!-- THE DATAZOOM BEACON SCRIPT --> <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script> </head> <body> <div class="vid-container"> <div id="player" style="width : 100% ;height : 400px"> </div> </div> <script> var kdp; kWidget.embed({ "targetId": "player", "wid": "XXXXXX", "uiconf_id": XXXXX, "flashvars": {}, "cache_st": XXXXXXXX, "entry_id": "XXXXXX" }); try { var kalturaPlayer = KalturaPlayer.setup(config); kalturaPlayer.loadMedia({entryId: '0_wifqaipd'}); datazoom_context = datazoom.createContext(kalturaPlayer); } catch (e) { console.error(e.message) } </script> </body> </html>
Stop Data Collection
If the data collection must be stopped for any reason, for example after the destruction of the corresponding player instance, invoke the destroy()
method of the Datazoom context object as in the following example:
document.getElementById("destroy").onclick = function() { if (kalturaPlayer) { kalturaPlayer.destroy(); kalturaPlayer = null; } if (datazoom_context) { datazoom_context.destroy(); datazoom_context = null; }
NPM (Node Package Manager)
We have made it convenient to manage your Kaltura Collector integration by providing NPM (Node Package Manager) support. Please see installation details here.
References:
Kaltura Player API Doc: https://developer.kaltura.com/player/web/api-web
Comments
0 comments
Article is closed for comments.