Ad Event Verification

Enable ad event reporting


This demo showcases how to enable ad event reporting for viewability measurement and tracking.



var conf = {
  key: '<YOUR PLAYER KEY>'
};

var source = {
  dash: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
  hls: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
  progressive: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',
  poster: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/poster.jpg'
};

var playerContainer = document.getElementById('player-container');
var player = new bitmovin.player.Player(playerContainer, conf);

player.load(source);

  • Ad start
  • Ad quartile pings
  • Ad error
  • Ad complete
player.on(bitmovin.player.PlayerEvent.AdStarted, function (data) {
    console.log("On Ad Started: " + JSON.stringify(data));
});

player.on(bitmovin.player.PlayerEvent.AdQuartile, function (data) {
    console.log("On Ad Quartile: " + JSON.stringify(data));
});

player.on(bitmovin.player.PlayerEvent.AdError, function (data) {
    console.log("On Ad Error: " + JSON.stringify(data));
});

player.on(bitmovin.player.PlayerEvent.AdBreakFinished, function (data) {
    console.log("On Ad Break Finished: " + JSON.stringify(data));
});
Event Log

Ready to get started?

Access your free account today by signing up for a trial