Skip to main content

Installation

Install with npm or yarn

npm install react-matomo-kit
# or
yarn add react-matomo-kit

Matomo requirements

To use this library, you need:

✅ A running Matomo server (your own or Matomo Cloud)
✅ Site ID
✅ Tracker URL (e.g. https://your.matomo.server/matomo.php)
✅ Source JS URL (e.g. https://your.matomo.server/matomo.js)

You can find these in your Matomo settings (⚙️ Admin → Websites → Tracking Code).


Example config

export const matomoConfig = {
siteId: "1",
trackerUrl: "https://your.matomo.server/",
srcUrl: "https://your.matomo.server/matomo.js",
};

You’re ready! Now continue with the Quick Start.