{"id":18456206,"url":"https://github.com/nicohood/grav-plugin-matomo","last_synced_at":"2025-08-09T02:10:02.738Z","repository":{"id":54164260,"uuid":"323676500","full_name":"NicoHood/grav-plugin-matomo","owner":"NicoHood","description":"Integrates Matomo analytics into Grav CMS","archived":false,"fork":false,"pushed_at":"2021-06-03T09:42:30.000Z","size":109,"stargazers_count":6,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-04-08T04:34:31.266Z","etag":null,"topics":["grav","grav-cms","matomo","matomo-plugin","plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicoHood.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-22T16:22:22.000Z","updated_at":"2024-03-16T17:42:51.000Z","dependencies_parsed_at":"2022-08-13T08:01:10.614Z","dependency_job_id":null,"html_url":"https://github.com/NicoHood/grav-plugin-matomo","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/NicoHood/grav-plugin-matomo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoHood%2Fgrav-plugin-matomo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoHood%2Fgrav-plugin-matomo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoHood%2Fgrav-plugin-matomo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoHood%2Fgrav-plugin-matomo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicoHood","download_url":"https://codeload.github.com/NicoHood/grav-plugin-matomo/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoHood%2Fgrav-plugin-matomo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265294011,"owners_count":23742407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grav","grav-cms","matomo","matomo-plugin","plugin"],"created_at":"2024-11-06T08:10:43.925Z","updated_at":"2025-07-14T12:39:11.542Z","avatar_url":"https://github.com/NicoHood.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/nicohood"],"categories":[],"sub_categories":[],"readme":"# Matomo Plugin\n\nThe **Matomo** Plugin is an extension for [Grav CMS](http://github.com/getgrav/grav). It integrates Matomo analytics into Grav CMS. Unlike other plugins this supports **server side tracking** via [Matomo PHP Tracking API](https://github.com/matomo-org/matomo-php-tracker). This plugin **requires no client side Javascript** but is easier to use compared to [Matomo Log Analysis](https://matomo.org/docs/log-analytics-tool-how-to/).\n\n\u003ca href=\"https://www.buymeacoffee.com/nicohood\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n\n## Features\n\n* Easy server-side tracking\n* Matomo Dashboard integrated in Grav Admin Plugin\n* Optional Cookie tracking\n* Optional Javascript tracking\n* Grav 1.6 and 1.7 supported\n\n## Installation\n\nInstalling the Matomo plugin can be done in one of three ways: The GPM (Grav Package Manager) installation method lets you quickly install the plugin with a simple terminal command, the manual method lets you do so via a zip file, and the admin method lets you do so via the Admin Plugin.\n\n### GPM Installation (Preferred)\n\nTo install the plugin via the [GPM](http://learn.getgrav.org/advanced/grav-gpm), through your system's terminal (also called the command line), navigate to the root of your Grav-installation, and enter:\n\n    bin/gpm install matomo\n\nThis will install the Matomo plugin into your `/user/plugins`-directory within Grav. Its files can be found under `/your/site/grav/user/plugins/matomo`.\n\n### Manual Installation\n\nTo install the plugin manually, download the zip-version of this repository and unzip it under `/your/site/grav/user/plugins`. Then rename the folder to `matomo`. You can find these files on [GitHub](https://github.com/nico-hood/grav-plugin-matomo) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras).\n\nYou should now have all the plugin files under\n\n    /your/site/grav/user/plugins/matomo\n\n\u003e NOTE: This plugin is a modular component for Grav which may require other plugins to operate, please see its [blueprints.yaml-file on GitHub](https://github.com/nico-hood/grav-plugin-matomo/blob/master/blueprints.yaml).\n\n### Admin Plugin\n\nIf you use the Admin Plugin, you can install the plugin directly by browsing the `Plugins`-menu and clicking on the `Add` button.\n\n## Requirements\n\nThis plugin uses the [Matomo PHP Tracking API](https://github.com/matomo-org/matomo-php-tracker) which depends on the following PHP modules:\n\n- json extension (json_decode, json_encode)\n- CURL or STREAM extensions (to issue the HTTPS request to Matomo)\n\n## Configuration\n\nBefore configuring this plugin, you should copy the `user/plugins/matomo/matomo.yaml` to `user/config/plugins/matomo.yaml` and only edit that copy.\n\nHere is the default configuration and an explanation of available options:\n\n```yaml\nenabled: true\nactive: true\n\n# Connection settings\nmatomo_url: 'https://example.tld'\nsite_id: 1\n# It is recommended to set the token via the grav dotenv plugin:\n# https://github.com/Ralla/grav-plugin-dotenv\ntoken: ''\n\n# Privacy settings\nrespect_do_not_track: true\nenable_cookies: false\nenable_javascript: false\n# Array of blocked client IP addresses for which tracking will be disabled.\nblockedIpAddresses: []\n# Array of blocked client IPv4 and/or IPv6 address ranges in the form\n# [\"192.177.204.1-192.177.204.254\", \"2001:db8::1-2001:db8::fe\", ...].\n# In addition to numerical ranges, the keywords \"private\", \"loopback\", \"link-local\" are recognized,\n# designating special IPv4 and IPv6 ranges (see RFCs 6890, 4193, 4291).\nblockedIpRanges: [\"private\", \"loopback\", \"link-local\"]\n# Name of a blocking cookie, which disables Matomo JS and PHP tracking, when set.\nblockingCookie: \"blockMatomo\"\n\n# Grav admin plugin dashboard settings\n# The dashboard token must only have read access:\n# https://matomo.org/docs/embed-matomo-reports/#embed-piwik-widgets-on-a-password-protected-or-private-page\ndashboard_token: ''\n# Specify a different site id for the dashboard.\n# This is useful if you have a test and production environment\n# and always want to show the production stats in the admin panel.\ndashboard_site_id: ''\n\n# Development settings\n# Enable this to add debug output about blocking reasons to the page's HTML source ('Matomo tracking blocked').\ndebug: false\n```\n\nNote that if you use the Admin Plugin, a file with your configuration named matomo.yaml will be saved in the `user/config/plugins/`-folder once the configuration is saved in the Admin.\n\nIt is **recommended to set the token via environment variables** and the [grav dotenv plugin](https://github.com/Ralla/grav-plugin-dotenv). Please **be aware** that the token will be currently [added to the config file](https://github.com/Ralla/grav-plugin-dotenv/issues/11) when editing the settings via the admin plugin.\n\n## Usage\n\nSimply configure your matomo host in the config and you are ready to go! Please note, that by default this plugin is **configured privacy focussed**. You and enable additional features like tracking with cookies, javascript or ignoring the \"Do Not Track\" header in the config. **Note:** Ignoring the \"Do Not Track\" header only makes sense when using the php tracker, not the javascript code. That's because the matomo instance will also evaluate the header and ignore the request.\n\nThe default config will only track the visited url, ip, referrer, language, browser/user agent, country (via ip lookup, if enabled on matomo) which is similar to [Matomo Log Analysis](https://matomo.org/docs/log-analytics-tool-how-to/), just that this plugin is more easy to use, extensible and gives instant results.\n\nIf you have any improvement, please do not hesitate to file an issue.\n\n## Credits\n\n* [Matomo PHP Tracking API](https://github.com/matomo-org/matomo-php-tracker)\n\n## To Do\n\n- [ ] Track events like form submissions with an additional form action\n- [ ] Add twig templates/css to also track impressions of objects via tracking pixel and mouseover\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicohood%2Fgrav-plugin-matomo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicohood%2Fgrav-plugin-matomo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicohood%2Fgrav-plugin-matomo/lists"}