Friday, September 9, 2011

Next generation of website traffic analysis

Times change and open source software diversifies even more. It wasn't that long ago when Awstats was the only thing I could imagine using in order to monitor the vital signs of websites. At the present day some content management systems have internal traffic monitoring and some have options in their backends where one can connect to monitoring services like Google Analytics.

Awstats' main view

I liked Awstats in that sense that it didn't require any extra code embedded in the documents it was intended to monitor unless you wanted to gather information like screen resolutions used. It also felt quite futuristic to be able to know geographically the source of traffic with plugins like geoip. Version 1.0 of Awstats  was released in 2000. I started using it around 2002 and to this day it has served it's purpose well. There is however one thing I don't like about it. It's the fact that it always gets hits from accesslog with usually a cron-based data retrieval(yes you can refresh it on the page too, but I don't like that). This might have been okay back in the day when there wasn't anything more sophisticated available, but I like my statistics live, thank you very much.

Piwik visitors overview
Awstats has been around for over ten years now and the amount of code produced by the open source community is surely substantial enough to offer us some decent alternatives by now. As it happens there's one neat application called Piwik. Application like Piwik could not have been possible at the time Awstats was released. Browsers were buggier and things like jQuery(released in 2006) were a distant dream. It must be aknowlidged that there are certain limiting factors in any application that is developed and one great factor is the technology available at the time.

Installing Piwik is breeze. It's like installing any other application that uses Mysql and resides on your server. A hated setting up multiuser environments with Awstats (lots of htaccess-hassle). Piwik has a stylish user interface with a login system that supports multiple users. With Awstats you couldn't really navigate your way through site stats. You had to type in the config parameter in the address bar for other than the default host. At one time I had access logs sent to my imap-box and a custom made script to get them processed by awstats and deleted from my mailbox after success. It wasn't very pleasant. Piwik uses a code snipplet to monitor traffic like Google Analytics does and the results are immediately viewable. For importing logs there is a tool called Apache2Piwik that works well.

Piwik has an API that can be used in various web applications like Joomla, Codeigniter, etc. To understate, the list of software and cms you can integrate with is impressive. I don't think Piwik has mail-monitoring capabilities yet, but I hope it will in the future. Awstats already knows how to go through your mail.log.

Piwik also provides stylish statistics widgets that you can embed like you can do with YouTube videos. I strongly recommend it for anyone who wants to monitor their traffic.

No comments:

Tip me if you like what you're reading