Skip to content

Commit

Permalink
use GoatCount on every page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Jan 15, 2025
1 parent a9fed9e commit bbe3e75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/src/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
import { useData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { nextTick, provide } from 'vue'
import { useRoute } from 'vitepress';
import { watch } from 'vue';
const route = useRoute();
watch(() => route.path, (path, referrer) => {
window.goatcounter?.count?.({ path, referrer });
})
const { isDark } = useData()
Expand Down

0 comments on commit bbe3e75

Please sign in to comment.