Reporting tools like Google Analytics and KISSmetrics are critical for determining how your site is performing. From unique visitor counts, referrals and bounce rates, these are all important puzzle pieces for understanding your site’s strengths and weaknesses (and learning where there are more opportunities to convert). However, for a lot of web admins, getting stats about video consumption is one of the missing pieces to tracking user engagement across a website.

In today’s post, we’ll talk about how you can use some tools that you already have in place to feed useful data about your videos into your web analytics dashboard (whether that be Google analytics, KissMetrics, etc.).

You’ll want to feed video data into your current web analytics so you can add meaningful data about how your visitors interact with your video players to your existing website data. You’ve spent time creating videos, so it’s important to see how they’re helping to convert as part of your website experience.

It’s the Missing Piece

Your web tracking strategy likely already includes a method to track page activity, but if someone views a video on any of your pages, your only hint might be the amount of time spent on the page (and even that’s a guess). This is a super common issue, and the amount of time spent on a page as assumed “engagement” isn’t a great way to track whether your videos are making an impact.

I mean let’s face it, friends don’t let friends use bad video engagement data!

Once you’ve pushed Vidyard data into an analytics dashboard like KissMetrics, it’ll look something like this:

Video events in KissMetrics

Setting up Event Tracking Using Vidyard

Lucky for you, that’s where event tracking comes in handy. Event tracking allows you to track a visitors interaction with specific elements on your website, such as a video player. Using the Vidyard JavaScript player API, Vidyard allows you to push a number of these events into your tool using their event tracking API. These events include, but are not limited to, ready, play, pause, seek and playerComplete.

In other words, you’ll see whether people play, pause, seek, or finish your player.
By pushing your own events, you can find out exactly what your visitors are doing with your videos. Hopefully the answer involves watching them! Let’s take a look at what you’ll need to do.

Note: For the purposes of this discussion, I’ll use KissMetrics, but the same concepts can be applied to any other web analytics tool with an event tracking API.

The first thing you’ll need is your web analytics tracking code. I’m going to assume you already have that on the page where your video is embedded.

Next, we need to reference the Vidyard player API:

<head>
	<script src="//play.vidyard.com/v0/api.js"></script>
</head>

Then, you can place your Vidyard embed code in the body of the page. Here’s one of my players:

<script type="text/javascript" id="vidyard_embed_code_CvMSiespEMc5lia2k2fHeg" src="//play.vidyard.com/CvMSiespEMc5lia2k2fHeg.js?v=3.1&type=inline"></script>

Finally, the moment you’ve been waiting for: the event push! As you can see from the KissMetrics example below, I’m pushing events for ready, play, pause and playerComplete.

<script type="text/javascript">
	var video = new Vidyard.player("CvMSiespEMc5lia2k2fHeg");
video.on('ready', function() { _kmq.push(['record', 'Loaded Homepage Video']); });
video.on('play', function() { _kmq.push(['record', 'Started watching Homepage Video']); });
video.on('pause', function() { _kmq.push(['record', 'Paused Homepage Video']); });
video.on('playerComplete', function(){ _kmq.push(['record', 'Completed Homepage Video']); });
</script>

You’re now set up to push video related events into your web analytics!

This means that, going forward, you’ll see events like play, pause, and reaching the end of a player. Call your friends and let them know what a great job you’ve done.

For bonus points, think about some of the things you might do with this data now that it’s in your tool. For example, you can track user timings between events to see how much time has passed between the a visitor’s interaction with a player. Feel free to share any ideas in the comments!

Jivan Ramsahai