Website analytics
Overview / comparism articles:
- Umami vs Plausible vs Matomo for Self-Hosted Analytics
- Good overview of open source analytics software
- LWN: Lightweight alternatives to Google Analytics
Umami
- Website
- GitHub
- Docs
- Requirements: MariaDB/MySql or Postgreql
- Written in React
- Helm charts on artifact hub
- Recently updated: christianhuth/umami
Plausible
- Docs
- Uses clickhouse + postgresql
Configuration
- Disable registration
Register new user:
- Browse to plausible URL
- Register new user (email addr. should match google email addr)
- Add website domain
- Add shown snippet to website HEAD
- Done!
After first user has registered, further registration is disabled.
Issues
Clickhouse resource usage
- Clickhouse uses a lot of disk space for even for low-traffic sites
- Calming down Clickhouse
Backup/Restore
- Docs: Export your website stats -> No import options !
- Docs: Stats API reference "It's a read-only interface to present historical and real-time stats only"
- No clear instructions for Clickhouse backups
- Backup Docker Installation
Geolocation
- Self-hosted city-level geolocation not working
- Default db-ip.com geolocation DB is inaccurate
- Feedback for cities and regions
- Accurate location - city level data
- Setting up city level data, fresh install only shows countries
- Alternative geolocation database
Matomo
- PHP
- Requirements: MariaDB
- Complicated to setup
GDPR and legal advisories
- Tracking ohne Cookies: Wie du Matomo cookiefrei nutzt und ob das eine gute Idee ist
- What data does Matomo track?
Privacy settings
JS snippet
Customize js snippet in Settings -> Websites -> Tracking code
or manually:
Disable cookies in client-side js
Insert _paq.push(['disableCookies']); before paq.push(['trackPageView']);
Kubernetes setup
- See
~/kubernetes/flux-config/bitrigger.varac.net/apps/varac/matomo-hr.yamlfor helmRelease config - Add
proxy_client_headers[] = HTTP_X_FORWARDED_FORto the [General] section to get the real visitor IP - Disable cookies in Matomo:
To disable all cookies for every site in Matomo, go to
Administration→Privacy→Anonymize dataand enable the checkboxForce tracking without cookies -
Geolocation See
~/Howtos/geolocation.mdhow to get the dbsh scp /var/lib/GeoIP/GeoLite2-City.mmdb bitrigger:/var/lib/Stackspin/local-storage/pvc-20f288b4-3e42-4422-b204-26c5c8b6c1da_varac_matomo-data/matomo/misc/DBIP-City.mmdb kubectl -n varac exec deploy/matomo -c matomo -- ln -s /bitnami/matomo/misc/DBIP-City.mmdb /opt/bitnami/matomo/misc/DBIP-City.mmdb
Issues:
/opt/bitnami/is not persitant, while/bitnamiis. So the symlink will vanish after a pod restart
Goatcounter
- No GDPR consent needed
- Anarcat blog post about Goatcounter
- No chart is available
- No official container image, only 3rd-party ones
Other
- Ackee
- No up to date helm chart found
- Sweetrix
- Fathom lite
- Posthog
- Countly