If you are a blogger then you should be definitely using an analytical tool like Google Analytics or StatCounter to monitor your site traffic details and other metrics.

How about setting up your own web analytics system where you have total control over your website data? Say hello to Piwik, the open source web analytics platform that is widely used by lot of companies, governments and individuals like us.

Before I show you how to install Piwik let us quickly watch the below video to understand the powerful features of Piwik.

Piwik indeed has some of the cool features isn’t it? So let’s go ahead see how to install and setup Piwik.

Installing Piwik

  • Download the piwik.zip (9.67 MB) file from the official Piwik website.
  • Extract the piwik.zip file and upload the contents to your server and place it under a sub folder. For example, if your website is www.website.com then create a sub folder called piwik and upload all your contents into that folder. Or if you have an unused domain then you could directly try using piwik in the root domain.
  • Once you have uploaded the contents, open up your browser and directly navigate to your sub folder or the root domain, based on where you have placed the extracted files.
  • If you have properly uploaded the Piwik installation files then you should be seeing a welcome screen as shown below. Click Next button.

Piwik Welcome Screen

  • The Piwik system will check and tell you if your hosting provider meets all the necessary requirements that is needed for installing Piwik. If yes then you should be able to proceed to the next step. Click Next button.

Piwik System Check

  • You have to create a MySQL database and a MySQL user in your hosting platform, if you are using cPanel then it is pretty easy to create these. Just provide those details as shown in the below screen and click Next.

Piwik Database Configuration

  • If the all goes well, you should see Tables Created with success! message. Click Next to proceed.
  • Create a Piwik super user, this is the id that you will be using to login into the system to check the details. Click Next.

Piwik Super User creation

  • Provide details like name, URL and Time Zone for the website that you would like to track in this screen and click Next.

Track Website Details

  • If all goes well Piwik should be installed and you should get your Tracking Code for your website. Make sure to copy the JavaScript tracking code and keep it separately. Click on continue to Piwik button and you should see a login screen. Use Super user id that you had created earlier to get access into the system dashboard.

Piwik Login Screen

Now that we have a system in place the next step is to setup the tracking code in your website so that it gets connected and the data is collected in Piwik.

Integrating Piwik with WordPress

There are plugins available to integrate the tracking code for content management systems like WordPress, Drupal, Joomla, TYPO3 etc. there are actually many more so feel free to check it out.

I also had Stat Counter enabled on my blog in addition to Google Analytics, so I just disabled that and added the WP-Piwik Plugin for WordPress.

Piwik WordPress Plugin

Once you have installed and activated the Plugin goto Settings -> WP-Piwik in your WordPress dashboard.

Enter the website URL where you had setup Piwik in the Piwik URL (REST API): section

And provide the Auth token: which is available in the API section in your Piwik Dashboard and Save Settings.

Piwik API Token

The Auth Token is just like your password, so please keep it safe and do not disclose it.

Go to Tracking Tab and check the Add tracking code check-box. That’s it you are all set, now sit back and wait for the traffic to flow into your website.

So was this useful to you? If Yes, then please spread the knowledge. Something isn’t good, i love feedback, so do not hesitate to reach out to me.