Matomo

In the past few weeks I’ve been making quite a few changes to this website. Some are visible, some less. Among the visible ones, I removed the downloadable PDF files feature, which were taking a lot of space and weren’t really that useful. Maybe some of you noticed1.

But the most important things are hidden from view. First of all, this website is now built and published using a GitLab CI/CD pipeline. That’s right, I’m going full DevOps but without Kubernetes. I’ll talk more about this in another article.

The other important change is that I have installed an instance of Matomo on this server, “the Google Analytics alternative that protects your data.” I have configured this Matomo instance to work in “cookieless” mode.

Matomo is extremely powerful, and superbly easy to configure.

  1. Copy the files on your server; it’s built with PHP, so Filezilla or scp are your friends. In my case I just ssh’d into my server and then wget https://builds.matomo.org/matomo.zip && unzip matomo.zip from there. Much simpler.
  2. Create a MySQL database; nothing that Hostpoint or any other decent web hosting couldn’t handle.
  3. Launch the installation of Matomo; literally, visit index.php and complete the wizard.
  4. Set a helpful cron job on the server to generate reports every so often.
  5. Configure the instance to go cookieless in the Administration settings.
  6. Include the JavaScript tracker code in the websites you would like to track:
<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//example.com/matomo/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '146']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->
  1. Download and configure the Matomo mobile app.

Going cookieless is very important to me, because it means that I keep my promise of not using cookies in this website, while at the same time I can have some information about who’s using it and from where in the world. The data I gather is 100% private, available only to me, and I don’t sell it to anyone.

So now you know. I’m just curious about where you come from and what devices you’re using; but I don’t care who you are specifically. And as always, thanks for visiting!


  1. To be honest, it was more an experiment on making a proper Makefile driving Pandoc than anything else. Generating the 600+ PDF files for this whole website took about half an hour in my laptop. But the end result was quite nice, with Pandoc even respecting the syntax-highlighting of the code snippets, the images, showing the links as a footer, and much more. Material for another article. ↩︎