Google Analytics

Hey guys,
So I have been doing some interesting stuff with Google analytics at my coop job (which is at the DP Library, University of Waterloo), and I figured I would share some of my progress.
I have been looking into how to track embedded youtube video progress using google analytics.
I’ll start by explaining why I would even want to do such a thing. I am working with the pilot team for screen casting in our department, and one of the things that they really wanted to do was be able to collect data with regards to watching screen casts. Obviously, this information could be really helpful, as they could find out if people stop watching videos after a certain period of time, or if people never watch the opening / closing statements, and other interesting things like that.
It had also been decided, that for the time, YouTube was the most viable option for the hosting of these videos, for various reasons.
I eventually, after spending some time familiarizing myself with the YouTube API’s was able to create a nice piece of javascript that does everything we needed. Basically, it tracks the current time of the video, and compares it to a few pre-decided points of time (the points you wish to track). If it hits a match, it calls a piece of javascript that tells Google analytics you “hit” a new page. Each of these pages are uniquely identified as the point name.
Thus presto, when you check your google analytics, you see hits on “pages” which represent different times in a video. Now as long as you organize these points appropriately (for example, /screencasting/video1/point1), you can easily see your progress.
However, there was still one problem with this solution. It was not the most user friendly approach, as you had to play though lots of javascript to create unique points. Since this needed to be very simple to use, considering that most people using it will not know any javascript at all, or code for that matter, I created a php front end that generates the appropriate javascript needed.
Now you might be thinking, isn’t php just as bad as javascript? And in a way yes, but being as it was a front end, I was able to make it quite simplistic to use, and change it from editing several * n lines of code, to n lines of code (where n is the number of tracked points).
I realize that this overview was very vague, and didn’t go into a lot of detail. I would go into more coding details, but I keep my code at work. Perhaps at the end of the term I will put the code up on my website, so that those who are really interested can see exactly what I did.
If you have any questions, email me, or just make a waffle (post a comment).
Cheers~ <(^.^,)>