Compatibility
✅ React 17+
✅ React 18
✅ React Router v6+
✅ Next.js (works well in client components)
✅ Remix
✅ Vite
✅ Create React App
Limitations
- Works only in React apps (not pure Node)
- You must load Matomo tracker JS (provided by your Matomo server)
- No SSR tracking (only client-side tracking)
Why only client-side?
Matomo uses _paq.push() → which requires window.
react-matomo-kit wraps this with React Context — works great in client-side apps.
If using Next.js — use in client components:
"use client";
import { MatomoProvider } from "react-matomo-kit";