Matomo
Integrate Matomo analytics dashboards directly into your Strapi admin panel
A plugin for Strapi that embeds Matomo analytics dashboards.
Supported Strapi version
Currently only Strapi v5 is supported.
Installation
With npm
npm install strapi-plugin-matomo
With yarn
yarn add strapi-plugin-matomo
In the config/plugins.ts
file add:
1module.exports = ({ env }) => ({
2 // ...other plugins
3 matomo: {
4 config: {
5 widgetURL: env('MATOMO_WIDGET_URL'),
6 },
7 },
8});
You can get the widgetURL in Matomo by going to _Site > Settings > Platform > Widgets It looks something like this:
1https://your-matomo-instance.com/index.php?module=Widgetize&action=iframe&widget=1&idSite=1&period=day&date=today&token_auth=abc123
☝️ This link allows you to embed Matomo reports on other websites or share them publicly, depending on permissions.
☝️ If you're using the strapi::security
middleware with CSP enabled, make sure
to allow your-matomo-instance.com
as a frame-src
. Your config/middlewares.ts
should look something like:
1 {
2 name: "strapi::security",
3 config: {
4 contentSecurityPolicy: {
5 useDefaults: true,
6 directives: {
7 "frame-src": ["https://your-matomo-instance.com"],
8 ...
📝 License
Made by TobeyTG ✌️
Install now
npm install strapi-plugin-matomo
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.