Analytics Decommission (Matomo)
Retiring the self-hosted Matomo (Piwik) analytics server. Recorded here because it touches multiple repos and the reasoning is worth preserving.
Status: server offline (June 10, 2026)
Code references drained and deployed; the Matomo server (analytics, 45.79.159.187) is now offline and slated for deletion. Nothing load-bearing depends on it. Remaining: delete the VM and clean up DNS, certs, and monitoring. (The separate api-script box is being retired in the same pass.)
What Matomo was
A self-hosted Matomo instance at analytics.macaronikid.com that (1) received public-site pageview tracking and (2) powered a single admin Dashboard widget. A second host, statistics.macaronikid.com, was referenced in dead code and now just redirects.
Key finding
Article, guide, event, and admin-dashboard statistics do not depend on Matomo. Those come from the API (statistic/trackView → MongoDB TownViewCount), via the admin panel's StatisticFactory. Matomo's only live consumers were the public-site tracker (a write) and one Dashboard widget whose result was never rendered.
Every code reference
| Host | File | Status |
|---|---|---|
| analytics.macaronikid.com | web2/includes/footer-analytics.php (Matomo block) | Live (write) — remove block, keep GA & internalTrack() |
| analytics.macaronikid.com | admin-panel/.../dashboard/dashboard.controller.js | Live but result unused — remove call, fn, DI |
| analytics.macaronikid.com | admin-panel/.../misc/analytics.factory.js | Source of all Matomo calls — delete file |
| analytics.macaronikid.com | admin-panel/.../guide/guideList.controller.js | Dead injection — remove DI |
| statistics.macaronikid.com | admin-panel/.../statistic/statistic.factory.js (getTownPageViewsGA) | Dead (never called) — remove fn + export |
The API and docker-compose repos contain no references.
Decommission order (drain first, take down last)
- Pre-flight — snapshot/export any Matomo data worth keeping (it can't be recovered after deletion).
- Remove code — delete every reference above. In AngularJS, remove all
AnalyticsFactoryinjections before deleting the factory, or affected pages throw "Unknown provider." - Build & deploy while Matomo is still up; confirm no analytics errors and no requests to the host.
- Stop the service — with code drained, this should produce zero new errors (a clean completeness check). Leave off for a grace period.
- Delete the VM and clean up DNS, firewall rules, certs, and monitoring tied to the host.
Note on Linode backups
Linode's Backup service is bound to the instance — it's deleted with the VM and can't be exported. The Capture Image feature caps at 6 GB of disk usage, so it fails on large boxes. For a durable backup, stream a mysqldump off-box rather than relying on either.