If you are seeking an open source web analytics software, Piwik is the solution for you. Other popular web analytics software such as Google Analytics are hosted on servers beyond your control. Piwik, on the other hand, is hosted on your own server. Therefore, the data is tracked only internally within your database. You may even implement advanced queries to build highly detailed reports.
The visitors to your website can rest assured that their user data is not being forwarded to advertising companies, because of Piwik privacy policies. No matter which web analytics feature you require, Piwik has it with the added advantage of privacy. To top it all off, Piwik provides you mobile email and SMS report delivery!
Read our guide to installing Piwik software on your Cloudways hosted website. You’ll be pleasantly surprised by how easy it is.
As a result of its popularity amongst our clients and the community we interact with, we have received many requests to integrate Piwik into the Cloudways platform. But installing it yourself is easy and it takes less than 10 minutes to set it up.
How To Install Piwik Analytics
As said before, Piwik is easy to install and run. However, you need to check its compatibility with your server.
Before You Begin
Probably, you already have an account with us. If not then, you can sign up here and create an account on Cloudways. Once you are in, you need to launch a server with PHP stack.
Beginning Installation of Piwik
Minimum requirements as of writing of this article are:
- Webserver such as Apache, Nginx, IIS, etc.
- PHP version 5.3.3 or greater
- MySQL version 4.1 or greater
- (Enabled by default) PHP extension pdo and pdo_mysql, or the mysqli extension
The good news is that all the cloud servers launched on Cloudways support the minimum requirements of Piwik. So, let’s jump right into installing it.
Step 1: Setting up PHP stack & Downloading Piwik
If you haven’t launched a PHP stack, then you can launch it on any server that you have created. Navigate to “Server Management” tab and click “Add Application”. Then, select PHP stack and launch it. It will take a couple of minutes to set it up.
After it is ready, then navigate to “Application Management” tab and login to the SSH Terminal by using the provided login credentials.
Once you are logged in, run the command:
wget http://builds.piwik.org/piwik.zip && unzip piwik.zip
That command will download the latest version of Piwik directly from the official Piwik directory and unzip it on your Cloudways PHP server.
Note: We recommend using SSH terminal for a fast and secure installation of Piwik on a Cloudways server. You can also use SFTP to manually upload the Piwik files to your servers, but that can take more time as SFTP is slower than SSH.
Step 2: Starting the 5-Minute Piwik Setup
After the download and extraction process is complete, navigate to your URL (like http://phpstack-xxxx-xxxx-xxxxx.cloudwaysapps.com/piwik/) to begin the Piwik setup.
Initially, you will see a welcome screen that informs you about a simple 8-step process that will take around 5 minutes to complete.
Next, Piwik will run a system check on your Cloudways servers. Don’t worry, you will pass it with 100% marks. 🙂
In the third step, you will need to connect your Piwik software to a database. On Cloudways Platform after each application launch, you will get a new and separate database. You can find the database credentials inside “Access details” section of the “Application Management” tab. Just copy and paste the database username, password and database name to Piwik form fields and hit “Next”.
On step 4, you will be informed that Piwik has successfully created its entries on your database. Just hit next.
On step 5, you will be asked to create a Super User. This information will be used whenever you will need to login to your Piwik dashboard to view the stats. So, be sure to memorize these details.
In the next step, you will be asked the name and URL of your first website. Enter the required details and go to next step.
Piwik will then generate a unique tracking code for your website. Make sure to have this tracking code included on the pages that you want to track.
How to set up Piwik Analytics on your WordPress website
If you are running WordPress websites, then the easiest way to install the Piwik tracking code is to navigate to WordPress Admin -> Appearance -> Editor and then select footer.php. Insert the Piwik tracking code just before the closing </body> tag.
Save the WordPress file and then hit next on Piwik and you’re all set and ready to track those awesome visitors to your website.
After the installation is complete, you will be redirected to your Piwik login screen. Just insert the Super User credentials here to login to your dashboard.
To make it easy, we will rename our PHP stack application in the Cloudways platform to something like Piwik Analytics. This way, you will find it easily by using the quick application search bar on the top navigation bar.
If you have any more questions regarding Piwik and its usage, then feel free to ask in the Comments section.
Start Growing with Cloudways Today!
We never compromise on performance, security, and support.