Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add matomo support #18

Merged
merged 2 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import matomo from "@datagouv/vitepress-plugin-matomo";
import './style.css'

export default {
Expand All @@ -11,7 +12,12 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
enhanceApp: (ctx) => {
matomo({
router: ctx.router,
siteID: 9, // Replace with your site id
trackerUrl: "https://matomo.dyne.org/" // Replace with your matomo url
})
}
} satisfies Theme
} satisfies Theme

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"prebuild": "cd docs/.installation_instructions && make didroom-microservices-installer.sh"
},
"devDependencies": {
"@datagouv/vitepress-plugin-matomo": "^1.0.5",
"vitepress": "^1.0.2",
"vitepress-sidebar": "^1.22.0",
"vue": "^3.4.21"
Expand Down
Loading
Loading