miggle
Published in

miggle

Rolling notes on my experiments with Matomo On Premise open source analytics

A screengrab of part of Matomo’s dashboard

I started exploring Matomo on 11th December 2020, and will continue to update these notes as I go. I’ve been looking at Matomo as an alternative to Google Analytics and Tag Manager, as well as an open source solution for harvesting cookie-free web stats.

I am working on the basis that as the EU Cookie law (or whatever replaces it in the UK) is not the same as GDPR regulations, that I can collect webstats without an opt-in providing I am not collecting or processing personal data as a result. One of the clear strengths of Matomo is the tools it provides to ensure data can be collected in a way that is highly compliant with GDPR, if configured correctly.

It’s taken me about 5 hours so far to get as far as I have with Matomo On Premise, which is the self-installed option. The first four steps — getting the basics up and running — took less than an hour.

This includes:-

  1. Setting up a Digital Ocean droplet for the first time. A $15 a month droplet is sufficient for the limited amount of pageviews I’ll be measuring to start with.
  2. Installing LAMP on it.
  3. Installing Matomo. (See tutorial)
  4. Adding the Matomo tracking code to a website.
  5. Making that I track stats without setting cookies. Start here to find out how. (Additionally, and not included in the time above, amending that site’s cookie and privacy policies, as well as adding in code that allows a user to opt out (although yet to test that last part)).
  6. Adding another site, and setting up a user with access to those webstats only. For this site the tracking code was added in using the Wordpress Matomo plugin.
  7. Setting up Matomo’s Tag Manager and then adding Matomo Analytics within that. That drops cookies by default. Ideally there’d be a way to block that — most likely a field setting in the tag, but I can’t see that option. The sledgehammer way to do this is to ‘Force Tracking without Cookies’ in the ‘Anonymize data’ section in Privacy Settings. However, this seems to then force this for all sites within that install, which may not be what is wanted.
  8. Also, what I can’t get to work in Tag Manager at all is Events. It seems they set up correctly, but Analytics does not track them.
  9. Configured goals.
  10. Set up a segment.
  11. Forced HTTPS for the dashboard.
  12. Added a custom logo and fav icon.
  13. Amended a recommended MariaDB memory setting. (Which most likely you’ll do by editing mariadb.cnf and adding max_allowed_packets=64M)
  14. Enabled email reports — not seen these work yet…
  15. Enabled 2FA.
  16. Researching how a site owner can migrate all of their stats and import into another instance of Matomo.

Still on the to do list (If anyone knows answers to these please do add to comments):-

  1. Get events working properly
  2. Make sure when Matomo’s Tag Manager calls Analytics, it doesn’t drop cookies.
  3. Get email reports working correctly.
  4. Set up cron for faster report loading. I can probably live without this just now.
  5. While I’m happy for now with my cookie-less tracking, I’d like to be able to add a Cookie banner which allows for a user to opt-in to tracking where cookies are set. So far I can’t find a cookie banner that will track that additional opt-in from a user.
  6. It seems unlikely that if IP addresses are anonymised that IP address filters will work. Needs more investigation.
  7. Amend my privacy policy, on basis Cloudflare drops a cookie, as does my embedded use of YouTube. While the former cookie is necessary I can’t stop it being dropped, and am currently unsure on how to block the YouTube one, and as such, deal with it.

Upgrading

I got my first message to upgrade Matomo on 22/12/20 to 4.1.0. This seems easy enough, you just do it as a one click install from the front-end. However, on doing so I got the following warning when System Check refreshed:-

Files were found in your Matomo, but we didn’t expect them.
→ Please delete these files to prevent errors. ←

File to delete: vendor/bin/lessc

To delete all these files at once, you can run this command:
rm “/var/www/matomo/vendor/bin/lessc”

I’m unsure what this refers to, but deleting it didn’t seem to cause an issue.

Digital decisions are never a walk in the park, so please get in touch and let me help you find the right way through the technical landscape.

--

--

--

There’s only one choice that’s the right one — an informed one

Recommended from Medium

In an Interview, Always Try To Negotiate From a Position of Strength

Woman talking in the woods

Blazor Server vs. Blazor Web Assembly

blazor server vs blazor WebAssembly

DevOps Transformation Risk — From a Different Point of View

YouTube-8M on AI Platform

Some Virtual Machine Magic.

Basic Graph Data Structure to demonstrate Friendships

Automation for Java Developers — tips and snippets

Shopify’s Success in Using RoR for its One Million Plus Users

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
alickmighall

alickmighall

Dad and Husband who loves the great outdoors. Own @miggle, digital product management consultancy.

More from Medium

Robotic Process Automation (RPA) vs. End-to-End Automation

Handling immature data platforms

5 Strategies to Deploy Microservices | Datafortune

For BFSI, ‘Affluence’ isn’t just a word, it is everything.