These are my setup notes for my personal Matomo installation on my Uberspace at analytics.simbo.de.
I just wanted some statistics to get an idea of what's up on my private web projects while respecting the privacy of my visitors. Regarding this simple goal, this whole approach seems a bit over the top but likewise necessary.
Make sure the domain of your Matomo installation supports and enforces HTTPS.
Place the extracted files in the respective docroot and open the URL to click through the installation process. Afterwards, login and customize your settings.
Enable GeoIP 2 (php) - installer and options at Settings > Geolocation
-
Location Database URL:
https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
-
ISP Database URL:
http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
Offer clearly visible and transparent informations about your tracking, how visitors can avoid it and how you handle personal data of your visitors.
-
anonymize IP adresses by at least 2 bytes (192.168.xxx.xxx)
-
use anonymized IP adresses for data enriching like geolocation
-
anonymize user and order IDs (if the website uses them after all)
-
let users opt-out of tracking
-
support do-not-track preference
If you are instead processing personal data, there are further steps to take. Like offering your visitors access to their personal data and the possibility to delete it.
In your website code, call disableCookies
before trackPageView
:
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
Regulary archived reports allow automated deletion of daily logs. Also, with reliable archives, archiving on browser view can be deactivated to allow faster responses for our matomo website.
Run crontab -e
to edit your crontab.
23 * * * * /var/www/virtual/simbo/analytics.simbo.de/console core:archive --url=https://analytics.simbo.de/ > /home/simbo/matomo-archive.log
This will run every hour at minute 23. Set path, URL and logfile according to your environment.