Skip to content

Commit dd8fc53

Browse files
authored
Revert "feat: remove docusaurus-plugin-matomo and add custom Matomo tracking …" (#633)
This reverts commit 90f507a.
1 parent 90f507a commit dd8fc53

File tree

2 files changed

+10
-23
lines changed

2 files changed

+10
-23
lines changed

website/docusaurus.config.js

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ const config = {
8686
editUrl: `${repoUrl}/edit/${branch}/website/`,
8787
editLocalizedFiles: true,
8888
},
89-
]
89+
],
90+
'docusaurus-plugin-matomo'
9091
],
9192
themeConfig: ({
9293
image: 'img/logo.svg',
@@ -197,31 +198,16 @@ const config = {
197198
theme: prismThemes.github,
198199
darkTheme: prismThemes.oneDark,
199200
additionalLanguages: ['java', 'bash']
201+
},
202+
matomo: {
203+
matomoUrl: 'https://analytics.apache.org/',
204+
siteId: '83',
205+
phpLoader: 'matomo.php',
206+
jsLoader: 'matomo.js',
200207
}
201208
}),
202209
themes: ['@docusaurus/theme-mermaid'],
203-
headTags: [
204-
{
205-
tagName: 'script',
206-
attributes: {
207-
type: 'text/javascript',
208-
},
209-
innerHTML: `
210-
var _paq = window._paq = window._paq || [];
211-
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
212-
_paq.push(["disableCookies"]);
213-
_paq.push(['trackPageView']);
214-
_paq.push(['enableLinkTracking']);
215-
(function() {
216-
var u="https://analytics.apache.org/";
217-
_paq.push(['setTrackerUrl', u+'matomo.php']);
218-
_paq.push(['setSiteId', '83']);
219-
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
220-
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
221-
})();
222-
`,
223-
},
224-
],
210+
headTags: [],
225211
markdown: {
226212
format: 'md',
227213
mermaid: true,

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@docusaurus/theme-mermaid": "^3.9.1",
2424
"@mdx-js/react": "^3.0.0",
2525
"clsx": "^2.0.0",
26+
"docusaurus-plugin-matomo": "^0.0.8",
2627
"markdownlint-cli2": "^0.18.1",
2728
"prism-react-renderer": "^2.3.0",
2829
"react": "^19.0.0",

0 commit comments

Comments
 (0)