Documentation
Matomo Analytics
Last updated May 10, 2026
Matomo gives you privacy-focused web analytics with self-hosted and cloud deployment options. The matomoAnalytics() helper sets up Matomo's _paq queue, points it at your tracker, and can queue consent-aware commands before the vendor bundle loads.
Integrate with c15t
How c15t loads it
- Category:
measurement(Analytics) - Loads when: measurement consent is granted by default
- Consent mode option: with
defaultConsent, the helper switches toalwaysLoad: trueand uses Matomo queue commands to grant/forget consent without unloading the SDK.
Configure the integration
If you want Matomo to manage consent internally, set defaultConsent to one
of these values:
'required'queues Matomo'srequireConsentcommand so no tracking runs until consent is granted.'given'queues Matomo'ssetConsentGivencommand so tracking starts as granted by default.
When defaultConsent is omitted, c15t uses the standard script-loader flow:
Matomo only loads after measurement consent is granted.
Tracking events in your app
Matomo's runtime API is queue-based (window._paq). When the script is not loaded yet, pushing to _paq is still safe as long as the queue exists. The helper creates _paq during setup.
From React:
From plain JavaScript:
Types
MatomoAnalyticsOptions
Loading…
Script
Loading…