strapi-plugin-matomo 0.0.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +7 -0
- package/README.md +77 -1
- package/dist/_chunks/{App-S_HgRhsg.mjs → App-BUfybguc.mjs} +1 -1
- package/dist/_chunks/{App-BiVY-Oop.js → App-DqSIMJjz.js} +1 -1
- package/dist/_chunks/{Dashboard-C9FKj-j8.mjs → Dashboard-CBCcLNJi.mjs} +0 -1
- package/dist/_chunks/{Dashboard-DdFVwM_o.js → Dashboard-D_U2f9RI.js} +0 -1
- package/dist/admin/index.js +29 -42
- package/dist/admin/index.mjs +30 -43
- package/package.json +1 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2025 Tobias Blättermann
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1 +1,77 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center" width="150px">
|
|
2
|
+
<img style="width: 150px; height: auto;" src="https://raw.githubusercontent.com/TobeyTG/strapi-plugin-matomo/master/assets/logo.png" alt="Logo - Strapi Matomo plugin" />
|
|
3
|
+
</div>
|
|
4
|
+
<div align="center">
|
|
5
|
+
<h1>Strapi v5 - Matomo plugin</h1>
|
|
6
|
+
<p>Add your Matomo analytics dashboard to Strapi</p>
|
|
7
|
+
<a href="https://www.npmjs.org/package/strapi-plugin-matomo">
|
|
8
|
+
<img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/tobeytg/strapi-plugin-matomo?label=npm&logo=npm">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/strapi-plugin-matomo">
|
|
11
|
+
<img src="https://img.shields.io/npm/dm/strapi-plugin-matomo.svg" alt="Monthly download on NPM" />
|
|
12
|
+
</a>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
A plugin for [Strapi](https://github.com/strapi/strapi) that embeds [Matomo](https://matomo.org/) analytics dashboards.
|
|
18
|
+
|
|
19
|
+
## Supported Strapi version
|
|
20
|
+
|
|
21
|
+
Currently only Strapi v5 is supported.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
With `npm`
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install strapi-plugin-matomo
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
With `yarn`
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
yarn add strapi-plugin-matomo
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
In the `config/plugins.ts` file add:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
module.exports = ({ env }) => ({
|
|
41
|
+
// ...other plugins
|
|
42
|
+
matomo: {
|
|
43
|
+
config: {
|
|
44
|
+
widgetURL: env('MATOMO_WIDGET_URL'),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
You can get the widgetURL in Matomo by going to \_Site > Settings > Platform > Widgets
|
|
51
|
+
It looks something like this:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
https://your-matomo-instance.com/index.php?module=Widgetize&action=iframe&widget=1&idSite=1&period=day&date=today&token_auth=abc123
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
☝️ This link allows you to embed Matomo reports on other websites or share them publicly, depending on permissions.
|
|
58
|
+
|
|
59
|
+
☝️ If you're using the `strapi::security` middleware with CSP enabled, make sure
|
|
60
|
+
to allow `your-matomo-instance.com` as a `frame-src`. Your `config/middlewares.ts` should look something like:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
{
|
|
64
|
+
name: "strapi::security",
|
|
65
|
+
config: {
|
|
66
|
+
contentSecurityPolicy: {
|
|
67
|
+
useDefaults: true,
|
|
68
|
+
directives: {
|
|
69
|
+
"frame-src": ["https://your-matomo-instance.com"],
|
|
70
|
+
...
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 📝 License
|
|
74
|
+
|
|
75
|
+
[MIT License](LICENSE.md)
|
|
76
|
+
|
|
77
|
+
Made by [TobeyTG](https://tobeytg.de/) ✌️
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Page } from "@strapi/strapi/admin";
|
|
3
3
|
import { Routes, Route } from "react-router-dom";
|
|
4
4
|
import { Suspense, lazy } from "react";
|
|
5
|
-
const Dashboard = lazy(() => import("./Dashboard-
|
|
5
|
+
const Dashboard = lazy(() => import("./Dashboard-CBCcLNJi.mjs"));
|
|
6
6
|
const HomePage = () => {
|
|
7
7
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Dashboard, {}) });
|
|
8
8
|
};
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const admin = require("@strapi/strapi/admin");
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
6
|
const react = require("react");
|
|
7
|
-
const Dashboard = react.lazy(() => Promise.resolve().then(() => require("./Dashboard-
|
|
7
|
+
const Dashboard = react.lazy(() => Promise.resolve().then(() => require("./Dashboard-D_U2f9RI.js")));
|
|
8
8
|
const HomePage = () => {
|
|
9
9
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(admin.Page.Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(Dashboard, {}) });
|
|
10
10
|
};
|
package/dist/admin/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const Initializer = ({ setPlugin }) => {
|
|
|
25
25
|
}, []);
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
|
-
const PluginIcon = () => /* @__PURE__ */ jsxRuntime.
|
|
28
|
+
const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
29
|
"svg",
|
|
30
30
|
{
|
|
31
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33,51 +33,38 @@ const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
33
33
|
width: "100%",
|
|
34
34
|
height: "100%",
|
|
35
35
|
viewBox: "-30 0 150 50",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsxRuntime.jsxs("
|
|
38
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39
|
-
/* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: "b", transform: "translate(-7.52 -22.83)", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("g", { "data-name": "Layer 1", children: [
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
39
|
"path",
|
|
41
40
|
{
|
|
42
|
-
d: "
|
|
43
|
-
fill: "
|
|
41
|
+
d: "M83.38 33.29l-.21-.33a.71.71 0 0 1-.1-.14l-14.59-22.2-18.85 14 13.85 21.26.17.27.08.11a11.8 11.8 0 0 0 19.69-13",
|
|
42
|
+
fill: "#95c748"
|
|
44
43
|
}
|
|
45
|
-
)
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M26.83 39.47a11.8 11.8 0 1 0-11.8 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#35bfc0" })
|
|
47
46
|
] }),
|
|
48
|
-
/* @__PURE__ */ jsxRuntime.jsxs("g", {
|
|
49
|
-
/* @__PURE__ */ jsxRuntime.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
68
|
-
] }),
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsxs("g", { "clip-path": "url(#a)", children: [
|
|
70
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M70.25 16.8a11.8 11.8 0 1 0-11.77 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#f38334" }),
|
|
71
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
"path",
|
|
73
|
-
{
|
|
74
|
-
d: "M58.48 28.6a11.78 11.78 0 0 1-9.86-5.32l-9-12.66a11.77 11.77 0 0 0-20.07 0L5.25 32.86a11.79 11.79 0 0 1 19.87.51l9.36 13.09a11.77 11.77 0 0 0 19 0l.09-.15.68-1 14-21.84a11.78 11.78 0 0 1-9.77 5.13M4.95 33.33l.26-.43z",
|
|
75
|
-
fill: "#3152a0"
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] })
|
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
48
|
+
/* @__PURE__ */ jsxRuntime.jsx("g", { opacity: ".5" }),
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
d: "M70.3 16.8a11.81 11.81 0 1 0-21.66 6.48l-9-12.66a11.78 11.78 0 0 0-20.08 0L5.3 32.86a11.79 11.79 0 0 1 19.87.51l9.31 13.09a11.77 11.77 0 0 0 19 0l.1-.15a10.53 10.53 0 0 0 .67-1.06l14-21.83a11.77 11.77 0 0 0 2-6.62m-19.84 8.58l.2.19-.2-.19m1 .88l.23.17-.16-.17m2.58 1.47l.31.11-.31-.11m1.28.43l.42.1-.42-.1m1.37.29l.42.06-.42-.06m9.57-2.77l.31-.29-.31.29m-6.39 2.84l.42-.07-.42.07m1.34-.24l.45-.12-.45.12m1.34-.41a3.57 3.57 0 0 0 .38-.14 3.57 3.57 0 0 1-.38.14m2.66-1.39l.25-.21-.29.22m2-1.77l.25-.27-.25.27M5.01 33.33c.09-.15.17-.29.27-.43l-.28.43z",
|
|
53
|
+
fill: "#3253a0"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M70.25 16.8a11.8 11.8 0 1 0-11.77 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#f38334" }),
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
d: "M58.48 28.6a11.78 11.78 0 0 1-9.86-5.32l-9-12.66a11.77 11.77 0 0 0-20.07 0L5.25 32.86a11.79 11.79 0 0 1 19.87.51l9.36 13.09a11.77 11.77 0 0 0 19 0l.09-.15.68-1 14-21.84a11.78 11.78 0 0 1-9.77 5.13M4.95 33.33l.26-.43z",
|
|
63
|
+
fill: "#3152a0"
|
|
64
|
+
}
|
|
65
|
+
)
|
|
79
66
|
] })
|
|
80
|
-
]
|
|
67
|
+
] })
|
|
81
68
|
}
|
|
82
69
|
);
|
|
83
70
|
const index = {
|
|
@@ -90,7 +77,7 @@ const index = {
|
|
|
90
77
|
defaultMessage: "Matomo"
|
|
91
78
|
},
|
|
92
79
|
Component: async () => {
|
|
93
|
-
const { App } = await Promise.resolve().then(() => require("../_chunks/App-
|
|
80
|
+
const { App } = await Promise.resolve().then(() => require("../_chunks/App-DqSIMJjz.js"));
|
|
94
81
|
return App;
|
|
95
82
|
}
|
|
96
83
|
});
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
4
4
|
const v = glob[path];
|
|
5
5
|
if (v) {
|
|
@@ -24,7 +24,7 @@ const Initializer = ({ setPlugin }) => {
|
|
|
24
24
|
}, []);
|
|
25
25
|
return null;
|
|
26
26
|
};
|
|
27
|
-
const PluginIcon = () => /* @__PURE__ */
|
|
27
|
+
const PluginIcon = () => /* @__PURE__ */ jsx(
|
|
28
28
|
"svg",
|
|
29
29
|
{
|
|
30
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32,51 +32,38 @@ const PluginIcon = () => /* @__PURE__ */ jsxs(
|
|
|
32
32
|
width: "100%",
|
|
33
33
|
height: "100%",
|
|
34
34
|
viewBox: "-30 0 150 50",
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ jsxs("
|
|
37
|
-
/* @__PURE__ */ jsx(
|
|
38
|
-
/* @__PURE__ */ jsx("clipPath", { id: "b", transform: "translate(-7.52 -22.83)", children: /* @__PURE__ */ jsx(
|
|
35
|
+
children: /* @__PURE__ */ jsxs("g", { "data-name": "Layer 1", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
39
38
|
"path",
|
|
40
39
|
{
|
|
41
|
-
d: "
|
|
42
|
-
fill: "
|
|
40
|
+
d: "M83.38 33.29l-.21-.33a.71.71 0 0 1-.1-.14l-14.59-22.2-18.85 14 13.85 21.26.17.27.08.11a11.8 11.8 0 0 0 19.69-13",
|
|
41
|
+
fill: "#95c748"
|
|
43
42
|
}
|
|
44
|
-
)
|
|
45
|
-
/* @__PURE__ */ jsx("
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx("path", { d: "M26.83 39.47a11.8 11.8 0 1 0-11.8 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#35bfc0" })
|
|
46
45
|
] }),
|
|
47
|
-
/* @__PURE__ */ jsxs("g", {
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
)
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ jsxs("g", { "clip-path": "url(#a)", children: [
|
|
69
|
-
/* @__PURE__ */ jsx("path", { d: "M70.25 16.8a11.8 11.8 0 1 0-11.77 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#f38334" }),
|
|
70
|
-
/* @__PURE__ */ jsx(
|
|
71
|
-
"path",
|
|
72
|
-
{
|
|
73
|
-
d: "M58.48 28.6a11.78 11.78 0 0 1-9.86-5.32l-9-12.66a11.77 11.77 0 0 0-20.07 0L5.25 32.86a11.79 11.79 0 0 1 19.87.51l9.36 13.09a11.77 11.77 0 0 0 19 0l.09-.15.68-1 14-21.84a11.78 11.78 0 0 1-9.77 5.13M4.95 33.33l.26-.43z",
|
|
74
|
-
fill: "#3152a0"
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] })
|
|
46
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
47
|
+
/* @__PURE__ */ jsx("g", { opacity: ".5" }),
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
d: "M70.3 16.8a11.81 11.81 0 1 0-21.66 6.48l-9-12.66a11.78 11.78 0 0 0-20.08 0L5.3 32.86a11.79 11.79 0 0 1 19.87.51l9.31 13.09a11.77 11.77 0 0 0 19 0l.1-.15a10.53 10.53 0 0 0 .67-1.06l14-21.83a11.77 11.77 0 0 0 2-6.62m-19.84 8.58l.2.19-.2-.19m1 .88l.23.17-.16-.17m2.58 1.47l.31.11-.31-.11m1.28.43l.42.1-.42-.1m1.37.29l.42.06-.42-.06m9.57-2.77l.31-.29-.31.29m-6.39 2.84l.42-.07-.42.07m1.34-.24l.45-.12-.45.12m1.34-.41a3.57 3.57 0 0 0 .38-.14 3.57 3.57 0 0 1-.38.14m2.66-1.39l.25-.21-.29.22m2-1.77l.25-.27-.25.27M5.01 33.33c.09-.15.17-.29.27-.43l-.28.43z",
|
|
52
|
+
fill: "#3253a0"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
57
|
+
/* @__PURE__ */ jsx("path", { d: "M70.25 16.8a11.8 11.8 0 1 0-11.77 11.8 11.8 11.8 0 0 0 11.8-11.8", fill: "#f38334" }),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
"path",
|
|
60
|
+
{
|
|
61
|
+
d: "M58.48 28.6a11.78 11.78 0 0 1-9.86-5.32l-9-12.66a11.77 11.77 0 0 0-20.07 0L5.25 32.86a11.79 11.79 0 0 1 19.87.51l9.36 13.09a11.77 11.77 0 0 0 19 0l.09-.15.68-1 14-21.84a11.78 11.78 0 0 1-9.77 5.13M4.95 33.33l.26-.43z",
|
|
62
|
+
fill: "#3152a0"
|
|
63
|
+
}
|
|
64
|
+
)
|
|
78
65
|
] })
|
|
79
|
-
]
|
|
66
|
+
] })
|
|
80
67
|
}
|
|
81
68
|
);
|
|
82
69
|
const index = {
|
|
@@ -89,7 +76,7 @@ const index = {
|
|
|
89
76
|
defaultMessage: "Matomo"
|
|
90
77
|
},
|
|
91
78
|
Component: async () => {
|
|
92
|
-
const { App } = await import("../_chunks/App-
|
|
79
|
+
const { App } = await import("../_chunks/App-BUfybguc.mjs");
|
|
93
80
|
return App;
|
|
94
81
|
}
|
|
95
82
|
});
|
package/package.json
CHANGED