Video Tracking in Google Analytics: Introduction
Interested in easily tracking YouTube Videos? We have some updated code. Check out our post here about Easily Tracking YouTube Videos in Google Analytics
Many sites have embedded video these days. I commonly hear requests from users of Google Analytics along these lines: “How can I measure whether my visitors are actually playing these videos? We spend a lot of money and effort producing them, so how do I tell if people even watch them? Or if they are more likely to become a customer if they do?”
Our approach: Event Tracking
We’re going to use the Event Tracking feature of Google Analytics to capture this stuff. If you’re not familiar, Event Tracking, in a nutshell, is designed to capture all of the non-pageview stuff that we might be interested in on a site. By default, Google Analytics captures just when pages load (through the regular tracking code on every page), but it doesn’t capture things that happen within pages, like clicks on downloads, or AJAX elements that bring in new content without a reload, or — in this case — plays of videos embedded in the page. Basically, anywhere someone clicks or otherwise interacts with the site, we can track.
Events get tabulated separately from the pages in a separate reporting section under Content. There are several parameters we can supply to describe an event:
- Category (required): high-level groupings of the different kinds of events on our site
- Action (required): within the category, what did the visitor actually do
- Label (optional): further differentiate what happened
- Value (optional): a numerical value that pertains to the event (no pre-assigned meaning, could be dollars or seconds or points or whatever)
Now, in the case of video, here is one example of how you might label the actions a visitor takes:
- Category: Video
- Action: Play, Pause, Stop, Finished
- Label: The title or filename of the video (assuming you have more than one video on your site)
Now, it doesn’t always make sense to capture every single thing someone might do. We have to think about what actions are interesting to us to actually have data about so we don’t collect a bunch of useless information. For video, I tend to think the two most vital things are Play (did they start watching) and Finished (did they get all the way to the end). I don’t care so much whether they paused it in the middle to take a phone call, and I certainly don’t care if they adjusted the volume.
Once I have this data, I can see it all in the Event Tracking reports (and through Advanced Segments) and break it down however I like: how many visits played any video, which visits played (or finished) a particular video, whether they converted, and so on.
Types of video players
OK, so how do we actually start collecting this data? Well, it requires some additional tracking code on our site to measure the video player. Depending on where the video is hosted and how it is played on the site, there are a few different approaches. In a series of followup posts, I’m going to explore a few different scenarios and how to track them with Event Tracking:
- Videos embedded with a Flash-based player, with special emphasis on FlowPlayer (an open-source player with a built-in capability for GA Event Tracking)
- YouTube videos embedded in a page
- Videos included in a page using the new HTML5 <video> element
Check back soon as we explore all the technical nitty-gritty to make the magic happen.