Deploying a Piwik Server on Clever Cloud

piwik server 1

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.

Blog

À lire également

UP Program: Clever Cloud announces its fifth startup selection

With this new batch, Clever Cloud welcomes four startups to the UP Program: Sentibee, Pictaderm, Legaia and Cockpit Agriculture.
Company

Sōzu 2.0 — turning a reverse proxy into a programmable edge

Sōzu is the reverse proxy that sits in front of every application running on Clever Cloud. After eighteen months of work — first the HTTP/2 multiplexer, built on our existing kawa pivot, then almost every other layer of the proxy, and finally a long run in production on the cleverapps.io load balancers — Sōzu 2.0 is out.
Engineering

K3s vs K8s: What Are the Differences and Which One Should You Choose in 2026?

Kubernetes has become the standard for container orchestration. But depending on your infrastructure constraints (limited resources, edge computing, IoT, or large-scale enterprise clusters), the distribution you choose can radically change the operational experience. K3s and K8s (upstream Kubernetes) address different needs, even though both share the same CNCF-certified foundation.
Engineering Features