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.

Blog

À lire également

Clever Tools: a year of enhancements for your deployments, on the road to v4

A command line interface (CLI) is at the core of developer experience. At Clever Cloud, we have been providing Clever Tools for almost 10 years.
Engineering Features

Otoroshi with LLM: simplify your API and AI service management on Clever Cloud

Your applications and services are evolving in an increasingly complex environment, requiring effective management of APIs and interactions with artificial intelligence models such as the very popular LLMs (Large Language Models).
Features

Markitdown-as-a-Service: from AI to production on Clever Cloud

Every day, new tools are released, AI brings new perspectives, you have new ideas. It's one of Clever Cloud's missions to help you to develop and test them in real-life conditions, effortlessly, before making them available to everyone.
Engineering