Pimp my website log
There are several free website log analyser out there, like AWStats , Analog , Webalizer or Visitors , but all of them have in common to generate quite ugly statistics. For this website I decided to use Visitors, because it is very easy to handle, fast and small. It can generate some interesting statistics like web trails and combined maps , which shows brighter fields for more hits on a 2D map.
But the use of html for generating graphs for sure is the wrong way. We can use SVG now (ok, the users of an uptodate gecko engine can), and this results in smaller and scaleable graphs.
I started hacking around two days ago and got finished with quite impressive first results (you need Mozilla Firefox 1.5 to display the SVG graphs properly) yesterday. It took me some time to find out how to draw ellipse sectors - the RFC is not very intuitive at this point. Finished with this, everything else was more or less trivial. Now you type something like this and you'll get some really beautiful SVG's:
# visitors -G -K -U -W -M -O -B -X -Y -R -o text --trails \
# --prefix http://example.com /path/to/access.log \
# | /path/to/visitors_svg/genstat.php -t /path/to/visitors_svg \
# -c /path/to/visitors_svg /path/to/report_directoryYou can obtain the source of the script here . But be warned:
It is not really tested for now - I just played around a little bit, and it works fine for me :-)
Do not think the code for the generation of the graphs is really reuseable ;-)
If you liked this blog post, or learned something please consider using flattr to contribute back: .
Comments
Fields with bold names are mandatory.
stelt at Wed, 08 Aug 2007 22:50:37 +0200
impressive first results = 404
Link to commentkore at Thu, 16 Aug 2007 13:06:39 +0200
Thanks for the hint. I updated the link and it works again now.
Link to commentمدرسة الحرس الاميرى at Mon, 07 Jul 2008 10:23:20 +0200
google
Link to comment