Skip to content

Commit

Permalink
docs: add swetrix analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Oct 31, 2024
1 parent 9232762 commit ca42a7a
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 63 deletions.
8 changes: 8 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { inBrowser } from 'vitepress'
import * as Swetrix from 'swetrix'
import VuetifyLayout from './VuetifyLayout.vue'

import './styles/main.css'
Expand All @@ -14,4 +15,11 @@ if (inBrowser)
export default {
extends: DefaultTheme,
Layout: VuetifyLayout,
enhanceApp() {
Swetrix.init('KMc9xOD28UCn', {
apiURL: 'https://swetrix-api.vuetifyjs.com/log',
})
Swetrix.trackViews()
Swetrix.trackErrors()
},
} satisfies Theme
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"generate-pwa-icons": "pwa-assets-generator"
},
"dependencies": {
"swetrix": "^3.4.1",
"vue": "^3.4.21"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit ca42a7a

Please sign in to comment.