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.
- 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.
- 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.
- 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.
- 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.
- Provide details like name, URL and Time Zone for the website that you would like to track in this screen and click Next.
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.
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.
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.