There are many website analytics solutions available; Google Analytics, StatCounter, AWStats are three of the most commonly used website analytics solutions but each one comes with its own drawback. Piwik is an open source website analytics software that’s very accurate, very easy to install and use and gives the webmaster a detailed overview of the website analytics. We’ve covered deploying Piwik on Openshift before, this time, we’re going to install it on Cloud9.
This post will present a step by step guide on how to install Piwik for free on Cloud9 for development purposes, please note that it’s not advisable to install a Production version of Piwik on Cloud9 as the free tier isn’t designed for that intended purpose. Now, and without further ado let’s dive into the tutorial.
First, you’ll need to sign-up for the free version of Cloud9.
After signing up and confirming your email, you’ll be directed to your dashboard, just click on the “create a new workspace” tab.
You’ll be directed to a new window where you should configure your workspace, select the “php” option and then create the workspace.
You’ll then be directed to your workspace, in the terminal just clone the latest release of Piwik using “wget”, at the time of writing this post the command should be as follow;
After the download is complete, we’ve to unzip the downloaded file using the following command;
Now you need to move all of the content of the downloaded folder to the main directory, in my case move the content from “piwik” to “test”.
After the unzip is complete just click on the “Run Project” arrow,then click on “Preview”, the installation window will appear in a browser-like window on the side of your screen.
In the first installation window, just hit the “Next” tab.
In the next step, the installation will check for the pre-installation requirements, click on the “Launch” then the “Next” tab.
In the following step, you should enter the database credentials, use the ones in the screenshot below; Database Server “0.0.0.0”, Login “root”, Database Name “c9”. Then you shall be directed to a new window that will inform you that a database table was created successfully.
In the following step, you should create the username and password that we’ll later use to login to our portal.
In the following step, you should select the website that you want to track as seen in the screenshot below.
In the following step, you’ll be prompted with the tracking code you should add to your website.
In the final step, we should select whether you want to allow “Don’t Track” also, whether you want to respect privacy laws/guidelines or not, then hit the “Continue to Piwik” tab.
Congratulations, now you have a fully functional installation of Piwik on Cloud9, as it’s been advised above this installation should be for development purposes only and not for production.