strapi-plugin-matomo 0.0.2 → 1.0.0

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 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
- # matomo-strapi
1
+ <div align="center" width="150px">
2
+ <img style="width: 150px; height: auto;" src="public/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/) ✌️
Binary file
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.2",
2
+ "version": "1.0.0",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -66,4 +66,4 @@
66
66
  "description": "Add your Matomo analytics dahsboard to Strapi.",
67
67
  "license": "MIT",
68
68
  "author": "Tobias Blättermann <tobias.blaettermann1@gmail.com>"
69
- }
69
+ }