feat: self-hosted cookieless Matomo, remove foreign tracking #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/matomo-analytics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
The site was shipping a hardcoded Matomo Tag Manager snippet pointing at a third-party instance (
krisnetics.biz) — a leftover from a previous dev, sending visitor data to a foreign endpoint without consent (DSGVO problem). This replaces it with Phil's own self-hosted, cookieless Matomo.Closes #17
Changes
Frontend / config (
c323544)krisnetics.bizMTM snippet from_components/core/footer.twig._system/analytics.twig— cookieless_paqtracker (disableCookiesbeforetrackPageView), rendered only whenMATOMO_URL+MATOMO_SITE_IDare set. Included before</body>in_layouts/base.twig.config/custom.phpsurfaces the two values to Twig viacraft.app.config.custom.*.Infra (
b07b313)docker-compose.traefik.yml: newmatomo(matomo:5.11-apache, current stable 5.11.2) + isolatedmatomo_db(mariadb:11.4) services, Traefik-routed at${MATOMO_DOMAIN}with LE. No host-port mapping. DB pre-wired so the installer skips the DB step.MATOMO_URL/MATOMO_SITE_IDinto thephpservice; document all vars in.env.production.example.Post-merge deploy steps (not in code)
analytics.philflow.io→ prod host — done by Phil.MATOMO_DOMAIN,MATOMO_DB_PASSWORD,MATOMO_DB_ROOT_PASSWORD(generated) to prod/opt/philflow/.env.docs/DEPLOYMENT.md(DB backup → rsync →docker compose -f docker-compose.traefik.yml up -d).philflow.io→ note site ID.MATOMO_URLin prod.env, restartphp.Verification
analytics.philflow.ioHTTPS reachable; visit records a hit; no_pk_*cookies (cookieless); nokrisnetics.bizin HTML.Caveat (honest)
Cookieless-JS in DE (TDDDG) reduces legal risk but is not a guaranteed consent exemption — accepted trade-off (no banner). Matomo's fully consent-exempt path would be server-side tracking.
🤖 Generated with Claude Code
Add matomo (matomo:5.11-apache, current stable 5.11.2) and an isolated matomo_db (mariadb:11.4) to docker-compose.traefik.yml, routed by Traefik at ${MATOMO_DOMAIN} with Let's Encrypt. No host-port mapping (avoids the redis_livekit-style conflicts on the shared host). DB is pre-wired via env so the web installer skips the database step. Forward MATOMO_URL / MATOMO_SITE_ID into the php service and document all vars in the prod env example. Refs #17 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>