##dz-db-collector-details
Plugin Integration
Datazoom provides plugins for data collection through our Beacon Services. Integrate the Ex.Co 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 Ex.Co player
To activate data collection for an Ex.Co player instance, create a Datazoom context which references the player instance with the following snippet:
datazoom_context = datazoom.createContext(exco_player);
For example:
// Derive the player instance const player = window.ExCoPlayer.connect('<PLAYER_ID>'); // Create context for tracking the player instance const datazoom_context = datazoom.createContext(player); // Start playback ... etc. player.init({/* options */}); ... player.play();
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:
if (player) { player.destroy(); player = null; } if (datazoom_context) { datazoom_context.destroy(); datazoom_context = null; }
NPM (Node Package Manager)
We have made it convenient to manage your Ex.Co Player Collector integration by providing NPM (Node Package Manager) support. https://www.npmjs.com/package/@datazoom/collector_exco
Comments
0 comments
Article is closed for comments.