I'm wondering if anybody has gotten the Video.js module/library to play nicely with Google Analytics? I'm trying to do some integration via this plugin (https://github.com/mickey/videojs-ga), but am hitting a roadblock. I've added the script into my theme as second-to-last in the execution order, followed by another script consisting of the inline code noted in the example (as the final script on my page):
<script>
videojs('video', {}, function() {
this.ga(); // "load the plugin, by defaults tracks everything!!"
});
</script>
At this point I think it's almost working, but chrome is throwing "Uncaught TypeError: The element or ID supplied is not valid." I've also tried replacing "video" on the above code with the ID of the video on the page that I am testing, and I'm getting the same error. I feel like I'm close, but I'm not sure what needs to be tweaked to get it working. Any ideas?
Right now I'm testing on http://mattweinercreates.com/video-js-testing, i you want to check out my environment.