| Requirement | Version | Notes |
|---|---|---|
| Shopware | ~6.7.0 | shopware/core as required by the plugin's composer.json |
| PHP | >=8.2 | |
| Matomo | any | A reachable Matomo instance (self-hosted or cloud). The Matomo URL must start with https://, otherwise the plugin outputs no tracking script |
| MmdKlaroConsent | optional | Only needed if you want to collect consent through Klaro (see Configuration) |
composer.json:{
"repositories": [{"type": "composer", "url": "https://packeton.markus-michalski.net"}]
}
You receive the repository credentials after purchase.
composer require mmd/sw67-matomo-analytics
bin/console plugin:refresh
bin/console plugin:install --activate MmdMatomoAnalytics
bin/console cache:clear
The plugin only outputs tracking code once the Matomo URL and Site ID are entered and Enable Tracking is switched on. You find the settings under Extensions > My Extensions > Matomo Analytics, see Configuration.
On install or update the plugin runs a database migration. It creates a Klaro cookie service for Matomo if the table mmd_klaro_cookie_service (plugin MmdKlaroConsent) exists at that moment. The migration:
matomo already exists| Field | Value |
|---|---|
| Technical name | matomo |
| Title (DE and EN) | Matomo Analytics |
| Purpose | analytics |
| Required | No |
| Enabled by default | No |
| Active | Yes |
| Cookie patterns | _pk_id, _pk_ses, _pk_ref (path /) |
The migration runs only once per installation. If you install MmdKlaroConsent after the Matomo plugin, the service is not created retroactively. In that case create it yourself in the Klaro administration, using a technical name that matches the Klaro Service Name setting.
composer update mmd/sw67-matomo-analytics
bin/console plugin:update MmdMatomoAnalytics
bin/console cache:clear
Your settings are kept during an update.
Uninstall the plugin under Extensions > My Extensions. The Klaro service matomo is not removed. If you no longer need it, delete it in the Klaro administration.
For questions you can reach me at support@markus-michalski.net.