Show HN: Native Analytics (work in progress)
swapped.cc
swapped.cc
I'm early in the process, so any ideas and feedback is welcome.
There are some bots that pretend to be phones browsing around, IE, firefox.
Just remember that relying purely on access log analytics isn't something that will return accurate results.
For one it is offset by the fact that the site it is used on is Ajax'ed, so it is fairly simple to filter out those who poll just the container page and don't follow up with querying any actual content. For two, I'm getting good at detecting bots by simple filtering by User-agent strings and IPs. So it is far from the picture of an utter disaster that you describe.
After all, the web logs that Apache spits out match your schema almost identically. They're perfectly parseable and have the advantage of being parseable at intervals (possibly from a different server) rather than forcing an insert from every page load.
By doing things this way, you essentially remove the ability to scale the application that's being logged. You're doing at least one database insert per page load, thus destroying any gains you might have seen from caching the content you're displaying. And of course, you can't actually cache anyway, since you need to actually run the PHP script for the page in question so that it will fire the database insert to register a hit.
So yeah, I'd suggest dropping that step and just having a worker swing by every once in a while, pull up the logfile, see what's new and bulk insert it into your database. Preferably, with said database and said worker all living on another machine so that they don't bog your production box.
Parsing a "line like this" is "\"harder than it looks\"".
I'm beginning to think it's a decent "weed-out" question.
PS: I am in Calgary (go flames go) :-)
Are there any frameworks that combine server-side logging (apache), application logging (django app log) and pull in data from google analytics?
Any recommendations for an open source "dashboard" app?
I hope you figure out how to block referrer spam. I use both GA and awstats as provided by my webhost, and the numbers are widely different. The referrer list at awstats is almost useless since I get hundreds of hits from viagra selling sites etc, despite the fact that I don't publish the referrer list publicly anywhere.
http://code.google.com/apis/analytics/docs/tracking/eventTra...
for example:
<a onClick="_gaq.push(['_trackEvent', 'Vids', 'Play', 'Title']);">Play</a>I guess the server side logs would come-in handy in that case.
Seriously though - I have used some of these in the past (settling however on Mint, which is not open-source in its common sense), none were perfect. I am a programmer, not a sysadmin, and it is more interesting for me to write something than to mess with package dependencies, default installation paths and what not. Digging through someone else's code and trying to bend it to my needs is not the best pastime either. On the other hand, writing analytics from scratch gives a chance to build exactly what I need, especially when it comes to the reporting function and the UI. In fact, in the UI/UX department I am pretty sure I can do better than existing O/S packages.
Also, whats the realistic percentage who disable javascript nowadays? Does AdBlock really block javascript? Does it really impact 3rd party services that use javascript to record the visit like say Google Analytics?
Or nice caching.
Your setup need that requests hits PHP, but most requests hits Varnish on most setups.
> Privacy - capturing the analytics data directly on the web server means not sharing it with other parties. For some people it is not an issue, but for others, me included, it is.
The requirements are very artificial IMO