Server-side tracking of TYPO3 events (e.g. page views) in Matomo.
composer require pagemachine/typo3-matomo-tracking
- Fill the
matomo_tracking
Extension Configuration:- Matomo instance URL (
matomoUrl
), e.g. https://matomo.example.com/ - Auth Token (
authToken
) for authenticated tracking
- Matomo instance URL (
- Set the Matomo site ID (
matomoTrackingSiteId
) in the settings of each TYPO3 site
It is recommended to configure a sane HTTP timeout like 3 seconds. This ensures pages load quickly in case a Matomo instance is not responding. Tracking will be skipped in this case.
By default page views will be tracked with the final page title and the current URL. The previous URL (referrer) will also be tracked if possible.
Clicks on file links can be tracked as downloads. This optional feature must be enabled
explicitly in the Extension Configuration through the Track downloads
(features.downloadTracking
) option.
This will rewrite all file links to an internal handler which tracks the request and redirects to the actual files. This should be tested well before using it in production, especially in relation to other TYPO3 packages which adjust file URLs.
Actions are tracked in Matomo with suitable attributes. To adjust or override these, you can add custom action factories.