matomo tracking added

This commit is contained in:
Christoph Haas 2024-12-23 18:35:38 +01:00
parent c0b577a37e
commit 8f3d0019e4
3 changed files with 25 additions and 0 deletions

View file

@ -32,6 +32,18 @@ export default defineConfig({
replacesTitle: true,
},
}),
// https://github.com/felix-berlin/astro-matomo
matomo({
enabled: import.meta.env.PROD, // Only load in production
host: "https://matomo.workaround.org/",
setCookieDomain: "*.workaround.org",
trackerUrl: "js/", // defaults to matomo.php
srcUrl: "js/", // defaults to matomo.js
siteId: 1,
heartBeatTimer: 5,
disableCookies: true,
debug: false,
}),
sitemap(),
],
});

View file

@ -14,6 +14,7 @@
"@astrojs/sitemap": "^3.2.1",
"@astrojs/starlight": "^0.28.3",
"astro": "^4.15.3",
"astro-matomo": "^1.7.0",
"sharp": "^0.32.5",
"typescript": "^5.6.3"
}

12
pnpm-lock.yaml generated
View file

@ -20,6 +20,9 @@ importers:
astro:
specifier: ^4.15.3
version: 4.16.7(rollup@4.24.0)(typescript@5.6.3)
astro-matomo:
specifier: ^1.7.0
version: 1.7.0(astro@4.16.7(rollup@4.24.0)(typescript@5.6.3))
sharp:
specifier: ^0.32.5
version: 0.32.6
@ -775,6 +778,11 @@ packages:
peerDependencies:
astro: ^4.0.0-beta || ^3.3.0
astro-matomo@1.7.0:
resolution: {integrity: sha512-TpgiP4X1ZiAFnPn73eOQtbEj0bRJX46q2a4oClswYtjZXbqaCnWFSfZjRByEk6RQsLXFAgBqvBUL0XF1VRSf4A==}
peerDependencies:
astro: ^2.0.0-beta.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
astro@4.16.7:
resolution: {integrity: sha512-nON+8MUEkWTFwXbS4zsQIq4t0Fs42eulM4x236AL+qNnWfqNAOOqAnFxO1dxfJ1q+XopIBbbT9Mtev+0zH47PQ==}
engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
@ -3127,6 +3135,10 @@ snapshots:
astro: 4.16.7(rollup@4.24.0)(typescript@5.6.3)
rehype-expressive-code: 0.35.6
astro-matomo@1.7.0(astro@4.16.7(rollup@4.24.0)(typescript@5.6.3)):
dependencies:
astro: 4.16.7(rollup@4.24.0)(typescript@5.6.3)
astro@4.16.7(rollup@4.24.0)(typescript@5.6.3):
dependencies:
'@astrojs/compiler': 2.10.3