Application collectors
Dailymotion Media Player
v2.12.0 • For the Javascript Collector
The Dailymotion Media Player Extension is a configuration option for the Javascript Collector by Datazoom that makes the following additional data points automatically collectable in real time.
Integration Instructions
Datazoom provides plugins for data collection through our Beacon Services. Integrate the Dailymotion plugin into your web application with the following snippet: Insert this JS line into your HTML Replace the This inserts Datazoom's data collection SDK into the page. To activate data collection for a Dailymotion instance, create a Datazoom context which references the player instance with the following snippet: For example: For example: If the data collection must be stopped for any reason, for example after the destruction of the corresponding player instance, invoke the We have made it convenient to manage your Dailymotion Collector integration by providing NPM (Node Package Manager) support. Please see installation details here. Dailymotion Player Doc : https://developers.dailymotion.com/player/#player Plugin Integration
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
CONFIG_ID value with the collector configuration ID.Activate Data Collection for a Dailymotion
datazoom_context = datazoom.createContext(dm_player);
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://geo.dailymotion.com/libs/player.js"></script>
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
<body>
<div>
<div id="video" style="width:50%"></div>
<hr/>
<button id="create">Create</button>
<button id="destroy">Destroy</button>
</div>
<script>
var dm_player;
var datazoom_context;
document.getElementById("create").onclick = function() {
dailymotion.createPlayer("video", { video: "k6B6qj2CaIw4Xbzv767" }).then(
player => {
dm_player = player;
datazoom_context = datazoom.createContext(dm_player);
},
error => {
console.error(error);
}
);
};
</script>
</body>
</html>
Option 2: Activate Data Collection for an embed Dailymotion Player
<!DOCTYPE html>
<html lang="en">
<head>
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
<body>
<div>
<div id="player-container" style="width:50%"></div>
<script src="https://geo.dailymotion.com/player/xgt7i.js" data-video="k6B6qj2CaIw4Xbzv767">
</script>
</div>
<script>
var dm_player;
var datazoom_context;
document.addEventListener("DOMContentLoaded", () => {
dailymotion.getPlayer().then(player => {
if (player) {
dm_player = player;
datazoom_context = datazoom.createContext(dm_player);
}
else {
console.error("Dailymotion player object not found.");
}
});
});
</script>
</body>
</html>
Stop Data Collection
destroy() method of the Datazoom context object as in the following example: document.getElementById("destroy").onclick = function() {
if (dm_player) {
dm_player.destroy();
dm_player = null;
}
if (datazoom_context) {
datazoom_context.destroy();
datazoom_context = null;
}
};
NPM (Node Package Manager)
References:
Ad Frameworks Extensions
If your Javascript application has a media player with an ad framework, Datazoom’s Javascript Collector with a Dailymotion Media Player can be extended with the following ad framework extensions.
Supported Data Points
Events
Discrete occurrences driven by user interactions or system actions
Metadata
Video
Attributes
User
Fluxdata
Metrics measuring changing parameters over time
-
Bandwidth
-
Buffer Duration
-
Buffer Duration - Content
-
Content Session Start Timestamp
-
Current Subtitles
-
Number of Content Plays
-
Number of Content Requests
-
Number of Errors
-
Number of Errors - Content
-
Pause Duration
-
Pause Duration - Content
-
Playback Duration
-
Playback Duration - Content
-
Playback Rate
-
Player State
-
Player Viewable
-
Playhead Position
-
Stall Count
-
Stall Count - Content
-
Stall Duration
-
Stall Duration - Content
-
Time Since Content Request
-
Time Since Content Started
-
Time Since Last Buffer Start
-
Time Since Last Buffer Start - Content
-
Time Since Last Heartbeat
-
Time Since Last Milestone - Content
-
Time Since Last Pause
-
Time Since Last Stall Start
-
Time Since Last Stall Start - Content
- Volume