I own a video streaming website and currently I just have a simple hit counter for each video. I want to have more full-featured video statistics diplayed. My initial thought was to log each hit in a database on my server, but then I realised that Google Analytics (GA) already had all the data I needed, plus loads of aggregation tools.
Here’s the pros and cons I can think for using the GA API:
Pros
- Easier
- Lots of ways of viewing data
Cons
- Less customisation (not much of a problem)
- Delays in dipsplaying the data on the site (depending on frequency of api calls)
The delays in getting the data is quite a problem since I want to list the “Most viewed videos today” and possibly “Most viewed videos in the past hour”.
Would it be best to use GA or a home-baked solution?
Analytics offers you a lot of customization as you can, taking your case as example, using javascript, track downloads as custom events to which you can associate id and numerical data.
It seems very appropriate.
Reference : https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
Implementing yourself even a dedicated part of those tools would be costly and would probably not achieve the same quality level.