mhe / silverstripe-matomo
Silverstripe module to include Matomo analytics tool
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
pkg:composer/mhe/silverstripe-matomo
Requires
- php: ^8.3
- silverstripe/recipe-cms: ^6.0
Requires (Dev)
- phpunit/phpunit: ^11.3
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2025-11-12 15:54:52 UTC
README
Add support for Matomo analytics tool to a Silverstripe installation.
- The specific setup is done via SiteConfig
- logged in backend users are excluded from tracking (configurable)
- insert opt-out code into template or simply into page content via shortcode
- opt-out supports inlined form/JavaScript (default) or Matomo-standard iframe
Requirements
Requires Silverstripe 6.x – for a version compatible with Silverstripe 5 see respective branch 5
Configuration
Options in CMS Settings (SiteConfig, Tab Matomo):
- Activate tracking
- Tracking URL (URL of Matomo installation)
- Site ID
Developer configuration (YAML)
- Mhe\Matomo\Extensions\MatomoConfig.track_cms_users: Track CMS users (with permission CMS_ACCESS_CMSMain) (default: false)
- Mhe\Matomo\Extensions\MatomoConfig.auto_add_tracking_head: add the tracking code to HTML head part – no modifications of the page template(s) needed (default: true)
- Mhe\Matomo\Extensions\MatomoConfig.optout: configuration of opt-out code, array with sub properties:
- method, either 'script' (default) or 'iframe'
Customizable templates
- MatomoOptOutIframe
- MatomoOptOutScript
- MatomoTrackingCodeBody
- MatomoTrackingCodeHead