- Easy server-side tracking
- Matomo Dashboard integrated in Grav Admin Plugin
- Optional Cookie tracking
- Grav 1.6 and 1.7 supported
Installing 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.
GPM Installation (Preferred)
To install the plugin via the GPM, through your system's terminal (also called the command line), navigate to the root of your Grav-installation, and enter:
bin/gpm install matomo
This will install the Matomo plugin into your
/user/plugins-directory within Grav. Its files can be found under
To 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 or via GetGrav.org.
You should now have all the plugin files under
NOTE: This plugin is a modular component for Grav which may require other plugins to operate, please see its blueprints.yaml-file on GitHub.
If you use the Admin Plugin, you can install the plugin directly by browsing the
Plugins-menu and clicking on the
This plugin uses the Matomo PHP Tracking API which depends on the following PHP modules:
- json extension (json_decode, json_encode)
- CURL or STREAM extensions (to issue the HTTPS request to Matomo)
Before configuring this plugin, you should copy the
user/config/plugins/matomo.yaml and only edit that copy.
Here is the default configuration and an explanation of available options:
Note 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.
It is recommended to set the token via environment variables and the grav dotenv plugin. Please be aware that the token will be currently added to the config file when editing the settings via the admin plugin.
The 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, just that this plugin is more easy to use, extensible and gives instant results.
If you have any improvement, please do not hesitate to file an issue.
- Track events like form submissions with an additional form action
- Add twig templates/css to also track impressions of objects via tracking pixel and mouseover