Back to

Well, if you need some logos, we provide these:

svg ·  png
Red Clever Cloud logo
svg ·  png
svg ·  png
White Clever Cloud logo
svg · png
White Clever Cloud logo
svg · png
Posted at November 9, 2016 — Features

Deploying a Piwik Server on Clever Cloud

Those days, gathering data is a pretty important thing to improve your application. It can, indeed, help you optimize your website by knowing where your visitors are clicking. All those informations are collected thanks to analytics platforms such as Piwik.

What is Piwik ?

Piwik is the leading open-source analytics platform that gives you, on top of good analytics, 100% data ownership and user privacy protection. You can know how many people visited a specific page and even set goals. For example, if you redirect your visitor to a thank you page if they buy your 10$ product, you can set a goal that says "If the visitor comes on this page, I will earn 10$". Therefore, you can have an entiere overview of your profits. You can use this link to access the Piwik demo and discover the graphical interface.

How can I run my Piwik server ?

So you want to deploy a Piwik server using Clever Cloud. The Piwik server is a PHP application, therefore there are two ways to install it. The easiest one is explained down below, using SFTP but you can also install the server locally and push it with git. If you want to set it up fastly and easily, just follow those few steps and you will be able to get analytics from your application in a few minutes !

Three simple steps

First things first, create a PHP SFTP application in the Clever Cloud console and link it with a MySQL addon.

Then, unzip the Piwik file available here and upload the content of the directory piwik at the root of your FSBucket. You can use for example, FileZilla to upload those files. Don't forget to add a .user.ini file with the line always_populate_raw_post_data=-1 in order to install Piwik.

The final step is to deploy your application and start the installation by clicking on your application link. If you have any issue, you can check the installation guide. When you have to setup your MySQL database, click on your MySQL addon in the Clever Cloud console and fill the form with (left: field name in Piwik/right: field name in MySQL):

  • Database server : Host
  • Login : User
  • Password : Password
  • Database name : Database

And that's it ! Your Piwik server is now ready to give you informations about your traffic. Don't forget to add the JavaScript code on each page. You can start setting up your own goals as mentioned above. If you have a big amount of traffic, don't hesitate to check this page that explains how you can optimize your Piwik server.

If you have not created your Clever Cloud account yet, you can sign up here and start creating your application.


Check out our Blog

We write about programming, security and Clever Cloud products

Join thousands of developers already using Clever Cloud. And try it for free!

Create your account now to start your apps and collaborate within a few minutes. For free with 20€ offered.

By signing up, your agree to our terms of use
Sign in with Github