From f006fa525b9615392f081fe6b2d771519016fc0a Mon Sep 17 00:00:00 2001 From: suvajit Date: Sat, 26 Oct 2024 01:09:08 +0530 Subject: [PATCH] feat: enable vercel analytics --- app/layout.tsx | 5 ++++ package-lock.json | 64 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ 3 files changed, 71 insertions(+) diff --git a/app/layout.tsx b/app/layout.tsx index da33ba7..d64228b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,6 +3,8 @@ import theme from '@/util/theme'; import { AppRouterCacheProvider } from '@mui/material-nextjs/v13-appRouter'; import { ThemeProvider } from '@mui/material/styles'; import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google'; +import { Analytics } from '@vercel/analytics/react'; +import { SpeedInsights } from '@vercel/speed-insights/next'; import type { Metadata, Viewport } from 'next'; import { Kanit } from 'next/font/google'; import { cookies, headers } from 'next/headers'; @@ -108,6 +110,9 @@ export default async function RootLayout({ {children} + + + ); diff --git a/package-lock.json b/package-lock.json index 0577109..c949975 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,8 @@ "@mui/x-date-pickers": "^7.12.0", "@next/third-parties": "^15.0.1", "@types/moment-duration-format": "^2.2.6", + "@vercel/analytics": "^1.3.2", + "@vercel/speed-insights": "^1.0.14", "chart.js": "^4.4.5", "chartjs-adapter-moment": "^1.0.1", "cookies-next": "^4.2.1", @@ -1709,6 +1711,62 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vercel/analytics": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.2.tgz", + "integrity": "sha512-n/Ws7skBbW+fUBMeg+jrT30+GP00jTHvCcL4fuVrShuML0uveEV/4vVUdvqEVnDgXIGfLm0GXW5EID2mCcRXhg==", + "license": "MPL-2.0", + "dependencies": { + "server-only": "^0.0.1" + }, + "peerDependencies": { + "next": ">= 13", + "react": "^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "next": { + "optional": true + }, + "react": { + "optional": true + } + } + }, + "node_modules/@vercel/speed-insights": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-1.0.14.tgz", + "integrity": "sha512-env1BkPddz1UaEZwBL4GmfRksMi2LbiYaKuoxMQjfLk83aEh7kkWMukkUhpQVs717NE6nnD+1+KO85GZHOZ4nQ==", + "hasInstallScript": true, + "license": "Apache-2.0", + "peerDependencies": { + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", @@ -5402,6 +5460,12 @@ "node": ">=10" } }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", diff --git a/package.json b/package.json index 0d46dd5..f039b3c 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "@mui/x-date-pickers": "^7.12.0", "@next/third-parties": "^15.0.1", "@types/moment-duration-format": "^2.2.6", + "@vercel/analytics": "^1.3.2", + "@vercel/speed-insights": "^1.0.14", "chart.js": "^4.4.5", "chartjs-adapter-moment": "^1.0.1", "cookies-next": "^4.2.1",