From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Non-Adform Video Player

Adform stats can be automatically tracked using any other video player or video element. To do so, you need to load some of the Adform scripts, create an AdformStats object and pass the video HTML element to the stats constructor.

Note: Only video events will be sent (see Video Player Tracking). If the video controls events are necessary, a user has to implement them into his custom video controls.

 

Example:

<!DOCTYPE html>
<html>
<head>
  <title>Demo</title>
</head>

  <body>
  <script>
    var components = [
      'VideoStats'
    ];
    document.write('<script src="' + (window.API_URL || 'https://s1.adform.net/banners/scripts/rmb/Adform.DHTML.js?bv=' + Math.random()) + '"><\/script>');
  </script>

  <video id="video" controls>
    <source src="sample_mp4_video.mp4" type="video/mp4">
  </video>

  <script>
      var videoElement = document.getElementById('video');
      if (videoElement) new Adform.Component.VideoStats(videoElement);
  </script>

  
</body>
</html>