Skip to content

fix: skip Matomo tracking on localhost#177

Merged
marc0olo merged 2 commits into
mainfrom
infra/matomo-localhost-guard
Apr 30, 2026
Merged

fix: skip Matomo tracking on localhost#177
marc0olo merged 2 commits into
mainfrom
infra/matomo-localhost-guard

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Apr 29, 2026

Summary

  • Moves the Matomo tracking script from an inline blob in `astro.config.mjs` to a dedicated `public/matomo.js` file
  • Adds a `location.hostname` guard so tracking is skipped on `localhost` and `127.0.0.1` — covers both `npm run dev` and `npm run preview`

Sync recommendation

hand-written

@marc0olo marc0olo merged commit 5ff7ec4 into main Apr 30, 2026
1 check passed
@marc0olo marc0olo deleted the infra/matomo-localhost-guard branch April 30, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant