JW Player - Chartbeat

Video Dashboard Implementation Instructions
for JW Player Customers
If you’re using JW Player as your video platform, you’ll need to change the Chartbeat Pinger to the
Chartbeat Video Pinger and include Title and Thumbnail attributes in your code.
Implementation Instructions
1
Include the JW Player attributes “title” and “image” in each video
This will populate the titles and thumbnails in your Video Dashboard. Your code should look
similar to:
jwplayer("myElement").setup({
file: "http://www.yoursite.com/video/movie.mp4",
title: "JW Video Example"
image: "http://www.yoursite.com/image/thumbnail.jpg"
});
2
Change chartbeat.js to chartbeat_video.js
In order to use the Video Pinger, you must modify the Chartbeat code already on your site. You’ll
want to switch the Chartbeat code to load chartbeat_video.js instead of chartbeat.js. The
chartbeat_video.js file includes both Publishing and Video tracking capabilities.
e.setAttribute('src', '//static.chartbeat.com/js/chartbeat_video.js');
Additional Notes
If you load your videos after the page has loaded (e.g. video loads when someone presses “play”),
you’ll need to manually push the video object to Chartbeat to start tracking. Just call the lines below
immediately after your video loads:
window._cbv = window._cbv || [];
window._cbv.push(jwplayer);
Checking Your Work
Your complete Chartbeat code will look something like this:
<script type='text/javascript'>
var _sf_async_config={};
/** CONFIGURATION START **/
_sf_async_config.uid = 12345;
_sf_async_config.domain = 'yoursite.com';
_sf_async_config.useCanonical = true;
_sf_async_config.sections = 'section1,section2';
_sf_async_config.authors = 'author1,author2';
/** CONFIGURATION END **/
(function(){
function loadChartbeat() {
window._sf_endpt = (new Date()).getTime();
var e = document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src', '//static.chartbeat.com/js/chartbeat_video.js');
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
</script>
Got stuck along the way? No worries. We’re happy to help.
[email protected]