Markus Michalski FAQ

Matomo Analytics: Installation and Operation

Matomo Analytics for Shopware 6.7: installation via Shopware Store, Composer or ZIP, activation, update, Klaro service and uninstallation.

Deutsche Version

Back to overview

Matomo Analytics: Installation and Operation

Requirements

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)

Installation

  1. Purchase the plugin in the Shopware Store
  2. In the Shopware Admin under Extensions > My Extensions, install and activate the plugin
  3. Clear the cache

Via Composer

  1. Add the private repository to your shop's composer.json:
{
    "repositories": [{"type": "composer", "url": "https://packeton.markus-michalski.net"}]
}

You receive the repository credentials after purchase.

  1. Install the plugin:
composer require mmd/sw67-matomo-analytics
  1. Activate the plugin:
bin/console plugin:refresh
bin/console plugin:install --activate MmdMatomoAnalytics
bin/console cache:clear

Via ZIP upload

  1. Upload the ZIP file under Extensions > My Extensions
  2. Install and activate the plugin
  3. Clear the cache

After installation

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.

Klaro service (automatic setup)

On install, update or activation of the plugin, a Klaro cookie service for Matomo is created automatically, provided the table mmd_klaro_cookie_service (plugin MmdKlaroConsent) exists at that moment and no service with the technical name matomo exists yet. Two independent mechanisms take care of this: a database migration that runs on install and update, and an additional check when the plugin is activated. Both create the service with the same values and assign it to all storefront sales channels:

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 /)

If you install MmdKlaroConsent after the Matomo plugin, the service is created automatically the next time the plugin is activated: deactivate the Matomo plugin under Extensions > My Extensions (or via bin/console plugin:deactivate MmdMatomoAnalytics) and activate it again (or via bin/console plugin:activate MmdMatomoAnalytics). Only if that is not possible in your environment, create the service yourself as a fallback in the Klaro administration, using a technical name that matches the Klaro Service Name setting.

Update

composer update mmd/sw67-matomo-analytics
bin/console plugin:update MmdMatomoAnalytics
bin/console cache:clear

Your settings are kept during an update.

Uninstallation

Uninstall the plugin under Extensions > My Extensions, or via the console with bin/console plugin:uninstall MmdMatomoAnalytics. When uninstalling you can choose whether to keep the plugin's data (in the admin the option "Keep user data", on the console the flag --keep-user-data).

If you choose to keep the data, nothing is changed, and an existing Klaro service matomo is left untouched as well. Without that option, uninstallation removes:

If no service with the technical name matomo exists, or the Klaro table does not exist at all, this step has no effect; the settings are removed regardless.

Support

For questions you can reach me at support@markus-michalski.net.