solar/umami-migration-notes.md

2.3 KiB
Raw Blame History

Migration from previous analytics to self-hosted Umami

This project previously used Plausible (third-party) analytics loaded from plausible.io. We now migrate to a self-hosted Umami instance.

On the live site:

  1. Deploy Umami (using umami-docker-compose.yml and the Nginx config example).
  2. In the Umami dashboard, create a site for degelas.be and copy its websiteId.
  3. Update frontend/index.html (already wired) to:
    • Set src to your Umami instance, e.g. https://analytics.degelas.be/script.js.
    • Replace data-website-id="REPLACE_WITH_UMAMI_WEBSITE_ID" with the actual websiteId from Umami.
    • Keep the old Plausible script temporarily if you want a short comparison window (you can keep both tags for a few days).
  4. Redeploy the frontend.

With both systems active, compare:

  • Pageviews and unique visitors per day.
  • Top pages.
  • Basic country distribution.

Small differences are expected; large discrepancies may indicate a configuration issue.

2. Switching fully to Umami

Once you are satisfied that Umami is working correctly:

  1. Remove the Plausible script from frontend/index.html on the server (locally it has already been replaced by the Umami script tag).
  2. Redeploy the frontend so only the Umami script loads.
  3. Update any internal reports or dashboards that currently depend on Plausible:
    • Replace data sources with Umamis exported reports or API where appropriate.

3. Documentation and privacy policy

  1. Update your public privacy policy to:
    • Reference self-hosted Umami analytics instead of Plausible.
    • Explain that geo-location data (country/region/city) is derived from IP addresses via a locally hosted GeoIP database.
    • Clarify retention and aggregation rules you apply.
  2. If you operate a cookie banner or consent mechanism:
    • Update the wording to mention Umami.
    • Ensure you respect user choices before loading the Umami script, if required by your jurisdiction.

4. Decommissioning the old service

After running on Umami alone for a suitable period and confirming that no internal processes rely on the old analytics:

  1. Remove the project/site from the old third-party analytics provider (if desired) to avoid confusion and extra data processing.
  2. Archive or export any historical analytics data you still need before deleting.