Operations

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

HostFileStatus
analytics.macaronikid.comweb2/includes/footer-analytics.php (Matomo block)Live (write) — remove block, keep GA & internalTrack()
analytics.macaronikid.comadmin-panel/.../dashboard/dashboard.controller.jsLive but result unused — remove call, fn, DI
analytics.macaronikid.comadmin-panel/.../misc/analytics.factory.jsSource of all Matomo calls — delete file
analytics.macaronikid.comadmin-panel/.../guide/guideList.controller.jsDead injection — remove DI
statistics.macaronikid.comadmin-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)

  1. Pre-flight — snapshot/export any Matomo data worth keeping (it can't be recovered after deletion).
  2. Remove code — delete every reference above. In AngularJS, remove all AnalyticsFactory injections before deleting the factory, or affected pages throw "Unknown provider."
  3. Build & deploy while Matomo is still up; confirm no analytics errors and no requests to the host.
  4. Stop the service — with code drained, this should produce zero new errors (a clean completeness check). Leave off for a grace period.
  5. 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.