Skip to content

Commit

Permalink
Merge pull request #8 from bitterteriyaki/feature/analytics
Browse files Browse the repository at this point in the history
[feature request] Add some Vercel analytics on the code
  • Loading branch information
bitterteriyaki authored Mar 5, 2024
2 parents 775c4fa + 0cc6cf5 commit 5ca385c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<template>
<NuxtLayout>
<NuxtPage />
<SpeedInsights />
</NuxtLayout>
</template>

<script setup lang="ts">
import { SpeedInsights } from '@vercel/speed-insights/nuxt'
useHead({
titleTemplate: '%s | kyomi',
})
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@bitterteriyaki/portfolio",
"private": true,
"type": "module",
"packageManager": "[email protected].3",
"packageManager": "[email protected].4",
"scripts": {
"build": "nuxt build",
"coverage": "vitest run --coverage",
Expand All @@ -18,6 +18,8 @@
},
"dependencies": {
"@nuxtjs/web-vitals": "^0.2.6",
"@vercel/analytics": "^1.2.2",
"@vercel/speed-insights": "^1.0.10",
"nuxt": "^3.10.1",
"vue": "^3.4.15",
"vue-router": "^4.2.5"
Expand Down
5 changes: 5 additions & 0 deletions plugins/analytics.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { inject } from '@vercel/analytics';

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

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

0 comments on commit 5ca385c

Please sign in to comment.