From 11c378a47c2ebc59f05b38b794294edf79ee5596 Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Thu, 20 Jul 2023 17:07:00 +0300 Subject: [PATCH] Add matomo tracking script --- docusaurus.config.js | 8 ++++++++ package-lock.json | 18 ++++++++++++++++++ package.json | 1 + 3 files changed, 27 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 905aa8d..c86d391 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -142,7 +142,15 @@ const config = { theme: lightCodeTheme, darkTheme: darkCodeTheme, }, + matomo: { + matomoUrl: 'https://analytics.openaire.eu/', + siteId: '373', + phpLoader: 'piwik.php', + }, }), + plugins: [ + 'docusaurus-plugin-matomo', + ], }; module.exports = config; diff --git a/package-lock.json b/package-lock.json index 4a2576f..1d97e51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@easyops-cn/docusaurus-search-local": "^0.33.6", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", + "docusaurus-plugin-matomo": "^0.0.6", "dotenv": "^16.0.3", "hast-util-is-element": "^1.1.0", "prism-react-renderer": "^1.3.5", @@ -5599,6 +5600,17 @@ "node": ">=6" } }, + "node_modules/docusaurus-plugin-matomo": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-matomo/-/docusaurus-plugin-matomo-0.0.6.tgz", + "integrity": "sha512-zAhUz3eMaW2tUJsvV5guOMwb554swoVEeI55BZA10LVk3+PyfWYpBl2FEHITe0ofA8/vG6BTuTzGNSWxW70NwA==", + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "@docusaurus/core": "^2.0.0-alpha.56" + } + }, "node_modules/dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -16728,6 +16740,12 @@ "@leichtgewicht/ip-codec": "^2.0.1" } }, + "docusaurus-plugin-matomo": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/docusaurus-plugin-matomo/-/docusaurus-plugin-matomo-0.0.6.tgz", + "integrity": "sha512-zAhUz3eMaW2tUJsvV5guOMwb554swoVEeI55BZA10LVk3+PyfWYpBl2FEHITe0ofA8/vG6BTuTzGNSWxW70NwA==", + "requires": {} + }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", diff --git a/package.json b/package.json index 8afe308..83c07d1 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@easyops-cn/docusaurus-search-local": "^0.33.6", "@mdx-js/react": "^1.6.22", "clsx": "^1.2.1", + "docusaurus-plugin-matomo": "^0.0.6", "dotenv": "^16.0.3", "hast-util-is-element": "^1.1.0", "prism-react-renderer": "^1.3.5",