Matomo Analytics: Configuration
Settings of Matomo Analytics for OXID eShop 7: Matomo URL and site ID, privacy, Klaro, e-commerce tracking, heartbeat and link tracking, with defaults and practical examples.
Matomo Analytics: Configuration
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
You find the settings in the admin under Extensions → Modules → Matomo Analytics → Settings. They apply per shop (subshop). After installation the module is switched off.
Basic Settings
| Setting | Default | Description |
|---|---|---|
| Enable tracking | Off | Master switch. Nothing is delivered without it. |
| Matomo URL | empty | Full HTTPS URL of your Matomo installation, for example https://analytics.example.com. A trailing slash is removed. |
| Site ID | 1 | The website ID from your Matomo installation. Must be greater than 0. |
The tracking code is only delivered when "Enable tracking" is on, the Matomo URL starts with https://, is a valid URL and contains none of the characters <, >, ", ', \, and the site ID is greater than 0. An http:// URL is invalid.
Privacy & Consent
What these settings do in detail is described on Privacy and Consent.
| Setting | Default | Description |
|---|---|---|
| Cookieless tracking | On | Outputs disableCookies: Matomo sets no tracking cookies. |
| IP anonymization | 2 bytes | No effect. Read, but not written into the tracking code. |
| Respect Do-Not-Track | On | Outputs setDoNotTrack and, without the Klaro integration, delivers no code when the DNT: 1 header is set. |
| Require consent | Off | Outputs requireConsent; without Klaro and without cookieless tracking it checks for a consent cookie. |
| Enable Klaro integration | Off | Embeds the tracking script as text/plain for Klaro. |
| Klaro service name | matomo | Name of the Klaro service. If the field is empty, matomo applies. |
The selection under "IP anonymization" (none, 1, 2 or 3 bytes) changes nothing in the tracking code. Enable IP anonymization in your Matomo installation instead.
E-Commerce Tracking
| Setting | Default | Description |
|---|---|---|
| Enable E-Commerce tracking | On | Parent switch. If off, product views, cart and orders are skipped. |
| Track product views | On | Product view with article number, title, category path and gross price. |
| Track cart | On | Cart update with all lines and the gross total. |
| Track orders | On | Completed orders on the confirmation page. |
What exactly is tracked
Product view: The module outputs the product view when the current page provides a product (typically the product detail page). On that page only the product view is output, no cart.
Cart: The cart code is output on every page that has a non-empty cart and does not output a product view. This is not event-based tracking of "item added". Every page view with a filled cart sends a cart update (addEcommerceItem per line, then trackEcommerceCartUpdate).
Order: When an order is saved and has an order number, the module stores the order data in the session. The confirmation page outputs it once. An order number is only registered once per session. The values:
| Value | Source |
|---|---|
| Order number | oxordernr |
| Revenue | Gross goods total (oxtotalbrutsum) plus shipping costs (oxdelcost) |
| Subtotal | Gross goods total |
| Tax | Gross goods total minus net goods total (oxtotalnetsum) |
| Shipping | oxdelcost |
| Lines | Article number (oxartnum), title (oxtitle), gross unit price (oxbprice), quantity (oxamount) |
Advanced Settings
| Setting | Default | Description |
|---|---|---|
| Enable heartbeat timer | Off | Outputs enableHeartBeatTimer with the configured interval. |
| Heartbeat interval (seconds) | 15 | Interval in seconds. An empty value or 0 is treated as 15. |
| Track outbound links | On | See note below. |
| Track downloads | On | See note below. |
"Track outbound links" and "Track downloads" are not independent. For both, the module outputs the same call
enableLinkTrackingas soon as at least one of the two switches is on. Only when both are off is it omitted.
Setting up Klaro
- In the module, enable Enable Klaro integration and enter the name of your Klaro service under Klaro service name (default
matomo). - Create a service with exactly this name in your Klaro configuration:
var klaroConfig = {
services: [{
name: 'matomo',
title: 'Matomo Analytics',
purposes: ['analytics'],
cookies: [/^_pk_.*$/, /^mtm_.*$/]
}]
};
The value name must match the module's Klaro service name, otherwise Klaro does not release the script and the consent handler reports no consent.
With Klaro the tracking code only runs after consent. The cookie list only matters if you turn cookieless tracking off. The module itself does not delete cookies.
Practical examples
1. Standard operation without cookies. Enable tracking, enter Matomo URL and site ID, leave everything else at its defaults. The module outputs disableCookies and setDoNotTrack, and there is no consent check.
2. Let visitors consent (Klaro). Turn cookieless tracking off, enable the Klaro integration, create the service in the Klaro configuration. The tracking code only runs after the visitor consents.
3. Your own cookie banner. Turn cookieless tracking off, turn "Require consent" on. The module only delivers the code if one of the recognized consent cookies (matomo_consent, CookieConsent, CookieControl, cookie-agreed) has a positive value. Because of requireConsent, Matomo waits for setConsentGiven, which your solution must call itself. See Privacy and Consent.
4. Page views only, no e-commerce. Turn "Enable E-Commerce tracking" off.