Matomo Analytics: Configuration
Matomo Analytics for Sylius - all settings per channel with defaults, admin interface, validity rules for Matomo URL and site ID, and practical examples
Matomo Analytics: Configuration
This documentation always describes the latest published version.
Where to configure
All settings live in the database and are maintained in the admin, there is no YAML configuration for the bundle. You find them under Admin sidebar > MMKreativ Plugins > Matomo Analytics.
The settings apply per channel, not globally: each channel has at most one entry with its own Matomo URL, its own site ID and its own toggles. A channel can only be configured once, a second entry for the same channel is rejected with an error message.
Admin interface
The Matomo Analytics page is a list with these columns: Channel, Enabled and Site ID. The list is sorted by channel code and has no filters. The create button adds an entry, and each row can be edited and deleted. There is no detail view. Below the page title the admin shows the installed plugin version.
After creating, updating and deleting, the admin shows a confirmation ("The Matomo channel settings have been successfully created/updated/deleted."). A second entry for the same channel is rejected with "This channel already has Matomo settings.", and an invalid Klaro service name with a note on the allowed characters.
When editing, the channel selection is locked: an entry cannot be moved to a different channel. If the channel has been deleted in Sylius in the meantime, the entry still shows its original channel code.
The MMKreativ Plugins entry in the sidebar is a shared group. If you install several MMKreativ plugins, they all appear under the same group.
Settings
| Setting | Default | Description |
|---|---|---|
| Channel | The channel the entry applies to. Required, locked after creation | |
| Enable Matomo tracking on this channel | off | Main switch. As long as it is off, no tracking script is rendered |
| Matomo URL | empty | Base URL of your Matomo installation, e.g. https://analytics.example.com. Must be HTTPS, see When a channel counts as configured |
| Site ID | 0 | The site ID from Matomo. Must be greater than 0 |
| Cookieless tracking | on | Visitors are recorded without Matomo cookies |
| Respect the browser's Do-Not-Track setting | on | Visitors with Do-Not-Track enabled are not recorded |
| Gate the tracking script behind Klaro consent | off | The script is only unlocked after consent in the Klaro dialog. Greyed out while the Klaro plugin is missing |
| Klaro service name | matomo |
Technical name of the Klaro service. Allowed: lowercase letters, digits, - and _ |
| Enable e-commerce tracking | on | Main switch for the two e-commerce toggles below |
| Track product views | on | Records product views, effective only while e-commerce tracking is on |
| Track completed orders | on | Records orders on the thank-you page, effective only while e-commerce tracking is on |
| Enable the heartbeat timer | on | Reports at regular intervals that the page is still open. Matomo can then measure time on page more accurately |
| Heartbeat interval (seconds) | 15 | Interval between heartbeat reports, must be greater than 0 |
| Track outbound links and downloads | on | Enables Matomo's link tracking |
Details on cookieless tracking, Do-Not-Track and Klaro are on Privacy and Consent.
When a channel counts as configured
The plugin also saves incomplete entries, but checks before every output whether the channel can actually track. All three conditions must hold:
- The main switch is on.
- The Matomo URL is a valid URL, starts with
https://and contains none of the characters<,>,",'or\. - The site ID is greater than 0.
If a condition is not met, the entry is treated like a disabled one everywhere: the storefront renders no tracking, and the Shop API answers with 404. Trailing slashes of the Matomo URL are removed.
The HTTPS requirement is enforced technically, not just recommended. A URL with
http://counts as not configured so that tracking data is never sent unencrypted.
E-commerce toggles
Product views and orders are only recorded if Enable e-commerce tracking and the respective individual toggle are both on. If you turn the main toggle off, both are off, regardless of the individual toggles.
Practical examples
Example 1: Shop with one channel, default values
| Setting | Value |
|---|---|
| Enable Matomo tracking | on |
| Matomo URL | https://analytics.example.com |
| Site ID | 3 |
All other settings stay at their defaults. The channel then tracks cookieless, respects Do-Not-Track and records page views, product views and orders.
Example 2: Two channels with separate site IDs
A shop with the channels DE and AT that you evaluate separately in Matomo:
| Channel | Matomo URL | Site ID |
|---|---|---|
DE |
https://analytics.example.com |
3 |
AT |
https://analytics.example.com |
4 |
Create a separate entry for each channel. A third channel without an entry tracks nothing.
Example 3: Tracking only after consent
You run the Klaro plugin and only want to track after consent:
| Setting | Value |
|---|---|
| Gate the tracking script behind Klaro consent | on |
| Klaro service name | matomo |
On save, the plugin creates the matching service in the Klaro catalog if it does not exist yet. Afterwards you can adjust it in the Klaro admin, the plugin never overwrites it. More on Privacy and Consent.
Example 4: Page views only, no e-commerce
Turn Enable e-commerce tracking off. The storefront still records page views but renders nothing on the product and thank-you pages.