Part of the Matomo ecosystem · 8 projects
Matomo Site Kit connects Drupal to Matomo On-Premise or Matomo Cloud. Enter the URL of your instance, choose a tracking method, and your site is measured: pages, searches, forms, accounts, Drupal Commerce orders, errors and AI chatbots. The reports of Matomo can then be read in the administration of Drupal.
It is made for Drupal 10.3, 11 and 12, needs no other module, and most options are already on after the installation.
Features
Three tracking methods
- Matomo Tag Manager: your container, with a dataLayer filled by Drupal. The container of a staging environment can be loaded too.
- Classic tracking code: page views, downloads, outlinks, custom dimensions, heartbeat timer, several domains and custom code.
- Server-side, in PHP: no script, no cookie, and nothing for ad blockers to block.
A button tests the connection before you save, and the settings show what each event sends.
A dataLayer filled by Drupal
Page type, content type, title, taxonomy terms, publication date, language, login status, environment and, if you want, roles and a hashed User ID. Everything is in _mtm before the container starts, or in dataLayer if you share it with Google Tag Manager.
Drupal Commerce
The Matomo Site Kit Commerce submodule tracks your shop with the method that you have chosen:
- With Tag Manager, the ecommerce events of Google Analytics 4:
view_item_list,select_item,view_item,view_promotion,select_promotion,add_to_wishlist,add_to_cart,remove_from_cart,view_cart,begin_checkout,add_shipping_info,add_payment_infoandpurchase. - With the classic code or PHP, the ecommerce reports of Matomo: product and category views, abandoned carts and orders, with tax, shipping and discounts.
- Brand, categories, variation, coupon and discount of each product, found in your fields.
- Carts and orders can also be sent from the server, so that an ad blocker or a closed tab does not hide a sale.
Events without any code
- Site search: keyword, category and number of results, for the core search, Views and Search API.
- Logins, logouts and registrations.
- Webforms and contact forms, once Drupal has accepted them, Ajax included.
- Clicks on email and phone links.
- 403 and 404 pages.
- Drupal messages shown to visitors.
AI chatbots
The pages that ChatGPT, Claude, Perplexity, Gemini or Mistral read to answer their users, which no JavaScript can see. They fill the AI Chatbots reports of Matomo and never count as visits.
Reports in Drupal
- A page in Reports: visits, channels, top pages, events and page performance.
- A Statistics tab on each content, and a block with the key figures.
- Annotations on the Matomo graphs when a content is published.
- One permission decides who sees them. Editors do not need a Matomo account.
Privacy
- Works with the cookie banners EU Cookie Compliance, Klaro and COOKiES.
- Wait for consent, wait for consent to set cookies, or track without cookies.
- Do Not Track, an opt-out block, excluded roles and excluded paths.
- By default, no name, form value or email address is sent. Administration pages, previews and one-time login links are never tracked.
Speed, security and quality
- Pages stay in the page cache and in the dynamic page cache. With Tag Manager, one inline script of less than 1 kB comes before the container.
- The auth token is never exported with the configuration, and can be read from
settings.phpor an environment variable. - Supports the Content Security Policy module, with a hash for the tracking code.
- Automated tests run on Drupal 10, 11 and 12. The code follows the Drupal coding standards.
- Documented hooks to change the page data, declare your own events or describe your products.
- Available in English, Arabic, Chinese (simplified and traditional), Dutch, French, German, Italian, Japanese, Polish, Portuguese and Spanish.
Post-Installation
- Go to Administration > Configuration > Web services > Matomo Site Kit.
- Enter the URL of your Matomo instance and choose a tracking method.
- Enter the container ID or the site ID, test the connection, then save.
- To see reports in Drupal, add an auth token and give the "View Matomo reports" permission.
- For a shop, install Matomo Site Kit Commerce and turn ecommerce on in the settings of the Matomo site.
Additional Requirements
- A Matomo instance, On-Premise or Cloud. AI chatbot tracking needs Matomo 5.7 or later.
- Nothing else: it works on a plain Drupal site, no other module is needed.
- For the Commerce submodule only: Drupal Commerce 3, on Drupal 10 or 11.
Compatible modules (optional)
You do not need any of these modules. If your site already uses one of them, Matomo Site Kit adapts to it:
- Drupal Commerce and Commerce Wishlist
- Webform
- Search API
- EU Cookie Compliance, Klaro and COOKiES
- Content Security Policy
Similar projects
Matomo Analytics adds the classic tracking code, and the container with a submodule. Matomo Site Kit also fills a dataLayer, tracks from the server, tracks Drupal Commerce and AI chatbots, and shows reports in Drupal.
Moving from one to the other is simple: the settings that both modules have in common are copied when Matomo Site Kit is installed, and tracking stays off until you choose a tracking method. User IDs do not change.
Matomo AI chatbot tracking adds the pages read by AI chatbots to the Matomo Analytics module. It is the one to choose if you want to keep that module. Use one solution or the other, or these pages are counted twice.
Supporting this Module
Matomo Site Kit is maintained by Openmost, an agency specialised in Matomo, which also publishes Matomo plugins and Matomo Site Kit for WordPress. Use the issue queue for bugs and ideas.
Ask your assistant about Matomo Site Kit
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Matomo ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-beta3 | Pre-release | 10–11 | PHP 8.1 | Dec 3, 2026 | |
| 1.0.0-beta2 | Pre-release | 10–11 | PHP 8.1 | Dec 3, 2026 |