First published at Wednesday, 1 March 2006

Warning: This blog post is more then 16 years old – read and use with care.

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_directory

You 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 ;-)

Comments

stelt at Wednesday, 8.8. 2007

impressive first results = 404

kore at Thursday, 16.8. 2007

Thanks for the hint. I updated the link and it works again now.