jQuery Plugin To Track User Activity On Videos - Videolog

File Size: 13.8 MB
Views Total: 1822
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Track User Activity On Videos - Videolog

Videolog.js is a jQuery plugin for video tracking that allows you to track the user activities (play, pause, etc) on your Youtube/Vimeo/HTML5 videos.

How to use it:

1. Embed the Youtube/Vimeo/HTML5(MP4) videos into the webpage.

<iframe id="vp" class="trackable-video" src="https://player.vimeo.com/video/VIDEO-ID"></iframe>
<iframe id="yt" class="trackable-video" src="https://www.youtube.com/embed/VIDEO-ID?enablejsapi=1"></iframe>
<video id="video" class="trackable-video" controls>
  <source src="video.mp4" type="video/mp4">
  Your browser does not support HTML5 video. 
</video>

2. Put jQuery library and the jQuery Videolog.js script at the bottom of the webpage.

<script src="jquery.js"></script>
<script src="dist/videolog.min.js"></script>

3. Include the Vimeo player API if you want to track the Vimeo videos.

<script src="//player.vimeo.com/api/player.js"></script>

4. Initialize the plugin and we're done.

$('.trackable-video').videoLog();

This awesome jQuery plugin is developed by PolarNotion. For more Advanced Usages, please check the demo page or visit the official website.