Piwik: Liberating Analytics - First Thoughts

  • Written by John
  • Jun 4th, 2015

I recently had a thought, one that I’ve always wondered. First, a little history. I currently run and administer a website for a client and has been running in full swing for around a year. One element of the website that I was curious about was how many of the websites users actually use the website itself. I mean, are the users just registered to it and not using it or are they actually coming back to it? It was one question that I wanted to answer. And in short, the answer is the users do come back and use the website, all of them (it is a small website holding less than 100 users).

Which software did I pick?

The website that I administer runs on CentOS so it is fairly easy to install any software, whether it’s run on PHP or runs on the OS itself, either way, it will run. I did a quick search and found some software called AWStats. To be honest, I was wanting to get this up and running as quick as possible so I didn’t do any research into what software I should use. I just grabbed AWStats and installed it. It took me some time to configure it and to understand how it works. The software works by pulling data from the Apache’s access_log file and breaking it up. The data that it pulls gets cached so the same data doesn’t get pulled again. In order to pull the data you need to run a command. I had set the command up in a cron job and set it to run every hour. This was working well, just leaving it to run but the development of it felt a little out of date and made me think twice of the software that I had chosen.

Moving away from AWStats

There were, and still are a couple of things that make me think that AWStats is out of date. The GUI that the analytics uses is very old, very plain, and looks a bit like how Godaddy’s basic stats is. There was also the issue of not being able to log into the website, instead where ever you installed the software you could navigate to that directory in your browser and anyone can view the data. To get around this second problem I had to protect the web directory. A workaround that was effective but by no means it was perfect. Thus my look for a second analytic software.

After a little searching around I found Piwik, an analytics tool which is that, similar to Google analytics. It is a very easy to install software, similar to installing forum software. You create a database with user permissions, extract the software to a web directory then run the installer in the browser. Doesn’t take long to install and once it’s done it’s ready to be used.

Issues thus far

I have been using Piwik for a little over 16 hours and for the most part it has been running smoothly. The only niggle that I have is after I installed it last night and then came back to it this morning, when I logged into the web dashboard it wasn’t connecting to the MySQL database. I had found that this was due to a lack of RAM that my server was running on. When I restart Apache it uses not much RAM at all but after a good 10 minutes the RAM usage is through the roof.