Piwik Web Analytics – A very good open source alternative to Google Analytics

Piwik is an open source, licensed under GPL, web analytics tool that uses PHP and MySQL. Piwik aims to be an open source alternative to Google Analytics.

The installation process is very easy to follow. To collect information, you just need to add your site to your Piwik installation then add the given Javascript code before the </body> of the site and you’re all set!

It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speakā€¦ and so much more.
Because Piwik has been built on the top of APIs, all the data is available through simple to use APIs. All features in Piwik are built inside plugins: you can download new plugins, and easily build your own. The user interface is fully customizable and light speed.

You can try out the Piwik online demo which will show you all the features and see if you like it or not.

I think this is far better than Google Analytics in the sense that:

  • You keep your data on your own server.
  • You can use the API to show stats on your websites.
  • It’s FREE both as in free speech and as in free beer.
  • If you know PHP, you can tweak it as you wish
  • You can host as many websites as you like! You can offer web stats to your friends and families!
  • It’s been elected SourceForge project of the month!

Easy Apache log statistics using Visitors

There are many Apache log analyzers that you can now choose from, but it can be long or confusing to install most of them. I wanted to try and find a simple log analyzer that just does its work using cronjobs. Visitors seems to fit the needs!
We’ll also use ip2host to resolve the IP addresses into domain names.
All of this will be run daily by a cronjob.

Screenshot of a report generated by Visitors
Screenshot of a report generated by Visitors

Continue reading “Easy Apache log statistics using Visitors”

scanerrlog – Generate summaries/reports from Apache error logs

scanerrlog offers the possibility to generate a summary or report about Apache errors and sort them depending on how frequent they are.

To install it (for Ubuntu users):

sudo apt-get install scanerrlog

or use Synaptic and search for scanerrlog.

It’s written in Python, and it is very easy to use it. (type ‘man scanerrlog‘ in a terminal to see the manual page)

I tested it with Apache2 log files using the following command:

scanerrlog -f text -o /tmp/log.txt /var/log/apache2/*.log
  • -f : format (text, pdf, html, xml)
  • -o : output file
  • args : log files

Continue reading “scanerrlog – Generate summaries/reports from Apache error logs”