Skip to content

Commit

Permalink
feat: add vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed May 5, 2023
1 parent 033591e commit e8dd9e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default defineNuxtConfig({
'nuxt-gtag',
],

plugins: [{ src: '~/plugins/vercel.ts', mode: 'client' }],

gtag: {
id: 'G-J37CFPQKF4',
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@nuxtjs/color-mode": "^3.2.0",
"@pinia/nuxt": "^0.4.9",
"@unocss/nuxt": "^0.51.8",
"@vercel/analytics": "^1.0.1",
"@vueuse/nuxt": "^10.1.2",
"eslint": "^8.39.0",
"nuxt": "^3.4.3",
Expand Down
5 changes: 5 additions & 0 deletions plugins/vercel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { inject } from '@vercel/analytics'

export default () => {
inject()
}
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit e8dd9e3

@vercel
Copy link

@vercel vercel bot commented on e8dd9e3 May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.