Skip to content

Add Matomo Tracking Script#685

Merged
heisbrot merged 1 commit intomainfrom
new/matomo-tracking
Apr 8, 2026
Merged

Add Matomo Tracking Script#685
heisbrot merged 1 commit intomainfrom
new/matomo-tracking

Conversation

@TechHutTV
Copy link
Copy Markdown
Collaborator

@TechHutTV TechHutTV commented Apr 7, 2026

Summary

image

Integrates Matomo analytics via Tag Manager (Solution 1) for SPA-compatible page view tracking across the docs site. The Tag Manager container handles History Change and Pageview triggers, so all client-side route changes in Next.js are tracked automatically without custom tracking code.

Changes

  • src/components/Matomo.jsx (new) — MatomoTagManager component that loads the Matomo Tag Manager container script using next/script with afterInteractive strategy
  • src/pages/_app.jsx — Renders <MatomoTagManager /> in the app root so tracking is active on every page

@heisbrot heisbrot merged commit 6755dbd into main Apr 8, 2026
1 check passed
@heisbrot heisbrot deleted the new/matomo-tracking branch April 8, 2026 14:06
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.

2 participants