Matomo Analytics: Troubleshooting and FAQ
Matomo Analytics for Sylius - common problems with symptom, check and solution, setup command messages, known limitations and frequent questions on privacy, channels and compatibility
Matomo Analytics: Troubleshooting and FAQ
This documentation always describes the latest published version.
Common problems
No tracking script appears in the storefront
Symptom: The page source contains no _paq.
Check:
- Is there an entry for exactly this channel under MMKreativ Plugins > Matomo Analytics?
- Is Enable Matomo tracking on this channel on?
- Does the Matomo URL start with
https://and contain none of the characters<,>,",'or\? - Is the site ID greater than 0?
- Has the migration run? If the table is missing, the plugin writes a warning to the log channel
mmd_matomoand renders nothing instead of crashing the shop.
Solution: Fill in the missing values or run bin/console mmd:matomo-integration:setup. An incomplete entry is treated like a disabled one everywhere.
The Shop API answers with 404
Symptom: GET /api/v2/shop/matomo-settings returns 404.
Check: The same points as above. The API and the storefront use the same validity check. Also check whether the request resolves to the channel you expect.
Solution: Complete the entry for the channel. See Configuration.
The script is there, but Matomo receives no data
Symptom: The script is in the page source, but no visits appear in Matomo.
Check:
- Is Do-Not-Track active in the browser and Respect the browser's Do-Not-Track setting on? Then the visit is deliberately not recorded.
- Is Klaro gating on, and has the visitor consented to the service? Without consent the plugin sends nothing.
- Does the site ID match the one in Matomo, and is the Matomo URL reachable from the browser?
- Does an ad blocker or a Content Security Policy block the requests to
matomo.jsandmatomo.php?
Solution: Test in a browser window without Do-Not-Track and with consent given, and check in the network tab whether matomo.php is requested.
The Klaro option is greyed out
Symptom: Gate the tracking script behind Klaro consent cannot be clicked.
Check: Is mmd/sylius-klaro-consent-plugin installed and registered in config/bundles.php?
Solution: Install the Klaro plugin and register the bundle. Only then is the option selectable.
Klaro gating is on, but nothing is ever tracked
Symptom: No data arrives, even after consent.
Check:
- Does the service appear in the Klaro dialog? The Klaro service name must match the technical name of a service in the Klaro catalog.
- Does the browser console show the warning
[MmdMatomo] Klaro unavailable - consent bridge inactive, nothing will be tracked.or[MmdMatomo] Klaro consent manager unavailable - consent bridge inactive.? Thenwindow.klarois not loaded or its manager cannot be retrieved.
Solution: Align the service name or save the entry again so that the service is created. If a service of that name already exists, it stays unchanged.
Klaro gating is on, Klaro plugin removed later
Symptom: An entry has Klaro gating on, but the Klaro plugin has been uninstalled. Nothing is tracked any more.
Check: In the form the Klaro option is now greyed out, but a saved value remains and the script is still rendered blocked.
Solution: Reinstall the Klaro plugin, or switch gating off by editing the entry in the admin.
Setup command aborts
The command prints its messages in English:
| Message | Cause | Solution |
|---|---|---|
The migrations of this plugin are not registered with Doctrine. Check that the bundle is enabled and that sylius_core.prepend_doctrine_migrations is not set to false. |
Bundle not active, or sylius_core.prepend_doctrine_migrations is set to false |
Check the bundle in config/bundles.php, revert the setting |
Migrations this plugin builds on are still open. Run "bin/console doctrine:migrations:migrate" first, then run this command again. |
Sylius migrations missing | bin/console doctrine:migrations:migrate, then start the command again |
mmd/sylius-matomo-integration-plugin migrations are written for MySQL 8 / MariaDB only. |
Different database | Use the plugin only with MySQL 8 or MariaDB |
On success the command reports Executed N migration(s)., and without an open migration Migrations are already up to date.
Known limitations
- Adding to the cart and quantity changes are not tracked, only product views and completed orders.
- Product views contain no price.
- Only MySQL 8 and MariaDB are supported.
- Klaro gating only works with the Klaro plugin
mmd/sylius-klaro-consent-plugin. - The admin list has no filters and no detail view.
- The Shop API is read-only.
- Translations are available in German and English.
FAQ
General
Do I need consent? That depends on your Matomo configuration and your jurisdiction. The plugin provides the tools (cookieless, Do-Not-Track, Klaro gating), the legal assessment is up to you.
Does installing change anything in the shop right away? No. A new entry is switched off until you enable it and enter the URL and site ID.
Configuration
Can I track several channels with the same Matomo site? Yes, enter the same URL and site ID in both entries.
Can I assign an entry to a different channel? No, the channel selection is locked after creation. Create the entry again.
Compatibility
Does the plugin run on PostgreSQL? No, the migration aborts there.
Does the plugin run with Sylius 2.0 or 2.1? No, Sylius 2.2 or later is required.