First, there’s nothing wrong with the Your Analytics plugin (AFAIK). And the JW Player is a well crafted video player. No doubt. The problem lies in how you analyze the data coming from the plugin. How you count your hits. To build a proper analytics backend you have to know what the data you get actually is.
It’s nice to get lots of “hits” but don’t fool yourself.
The example php backend script simply counts the play, pause and completed states received from the plugin. If you think the play count is the number of times your video has been played, you’re wrong. If you think the completed count is the number of times your video has been played to completion, you’re wrong. The pause count is probably the only number which is what you think it is.
Here’s what’s being counted:
PAUSE. Every time a user hits the pause button the pause counter is increased. Fine.
PLAY. Every time a user hits the play button the play counter is increased. No surprise there either. But if a user hits play, then pause, waiting for the buffer to load, then hits play again (many people does this), he’s count twice. Also, everytime a user does a seek, that’s moving to a different place in time, either backwards or forwards, that’s actually resulting in a new play event. So if I want to rewatch the scene I just saw, clicking the timebar a few times to find the right spot, every move is a play count.
COMPLETED. When a user has played a video to completion the complete counter is increased. That’s what it sounds like, so that’s fine. We want to know how many has seen the whole film. But if a user “cheats” and skips to the end to watch the last few seconds, he’s also counted as a complete watch. And if you click to jump to a spot in the video which is not loaded yet, the player resets itself and it’s actually counted as a completion. Figure that. On the other hand, a user might watch the whole video but skip to something else 2 seconds before its completely done (skipping credits perhaps). Then that’s not counted. But it should be.
Also, I’ve been logging what comes out of Your Analytics for about two weeks. In addition to people watching a 40 minute lecture in 30 seconds (from the first PLAY to COMPLETE), there also seems to be a bug either in the player or in the plugin that results in a lot of COMPLETE events being sent. Sometimes 20 or 30 in a row. At other times many hundred from the same IP at the same time (from 4 to 10 each second).
MY POINT IS: If you simply count the play, pause and complete events sent from Your Analytics, as done in the example script, at best you get a reliable number of now many times people have paused your video. Well, you could use the play count as an indicator of the interest payed to a video. But not how many users are involved.
WHAT TO DO, NOW. Well, since the data coming from the plugin is transmitted by HTTP you actually get some interesting info in addition to the state and filename.
You get the user agent (name and version of the user’s web browser).
You also get the http referer (where they’re coming from, the url).
More importantly you get the users’ IP addresses. It’s not a session id, nor guaranteed to be a unique user, but combine it with a timestamp, and perhaps the user agent, and you have something somewhere up that alley.
To build a good analytics backend you have to keep track of state changes for each user along a timeline. That way you can not only count individual users, but also the number of playings.
To get good output data requires knowledge of the input data. Since that knowledge is not in the plugin it has to be in the backend.
If you have no clue what I’m talking about or if you have no experience in analyzing data you should not use this plugin.
NEW: COUNT TRACKULA
This new analytics plugin might be an easier choice. It does things a bit differently. Instead of sending all state changes to the backend it sends a message when the video starts, when it’s in the middle, and when it ends. It can also send a message when it has played a set number of seconds.
A couple of remarks: Each message is only sent once. Upon replay it will not send any messages to the backend. Also, there’s a bug causing development versions of the Flash player to popup with a warning. That shouldn’t be hard to fix.