From 7fb394d650d577adbbdf4e1a9e50eb9e553e0c31 Mon Sep 17 00:00:00 2001 From: Mumtahin Farabi Date: Mon, 24 Jun 2024 22:02:27 -0400 Subject: [PATCH] chore: Add Vercel Analytics --- package.json | 1 + pnpm-lock.yaml | 26 ++++++++++++++++++++++++++ src/app/layout.tsx | 2 ++ 3 files changed, 29 insertions(+) diff --git a/package.json b/package.json index 13cee71..cd0e796 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@hookform/resolvers": "^3.4.2", "@sanity/image-url": "^1.0.2", "@sanity/react-loader": "^1.10.2", + "@vercel/analytics": "^1.3.1", "clsx": "^2.1.1", "framer-motion": "^11.1.7", "next": "^14.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3af42a..dc0ac4a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@sanity/react-loader': specifier: ^1.10.2 version: 1.10.2(@sanity/client@6.19.1)(react@18.2.0) + '@vercel/analytics': + specifier: ^1.3.1 + version: 1.3.1(next@14.2.3(@babel/core@7.24.7)(@playwright/test@1.44.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0) clsx: specifier: ^2.1.1 version: 2.1.1 @@ -3264,6 +3267,17 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vercel/analytics@1.3.1': + resolution: {integrity: sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==} + peerDependencies: + next: '>= 13' + react: ^18 || ^19 + peerDependenciesMeta: + next: + optional: true + react: + optional: true + '@vercel/stega@0.1.2': resolution: {integrity: sha512-P7mafQXjkrsoyTRppnt0N21udKS9wUmLXHRyP9saLXLHw32j/FgUJ3FscSWgvSqRs4cj7wKZtwqJEvWJ2jbGmA==} @@ -8908,6 +8922,9 @@ packages: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} + server-only@0.0.1: + resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==} + set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -14168,6 +14185,13 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@vercel/analytics@1.3.1(next@14.2.3(@babel/core@7.24.7)(@playwright/test@1.44.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0)': + dependencies: + server-only: 0.0.1 + optionalDependencies: + next: 14.2.3(@babel/core@7.24.7)(@playwright/test@1.44.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + '@vercel/stega@0.1.2': {} '@vitejs/plugin-react@4.3.0(vite@4.5.3(@types/node@20.14.2)(terser@5.31.1))': @@ -21110,6 +21134,8 @@ snapshots: transitivePeerDependencies: - supports-color + server-only@0.0.1: {} + set-blocking@2.0.0: {} set-function-length@1.2.2: diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 0b8852b..d6f5d04 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,6 @@ import './globals.css'; +import { Analytics } from '@vercel/analytics/react'; import type { Metadata, Viewport } from 'next'; import { Open_Sans } from 'next/font/google'; @@ -25,6 +26,7 @@ export default function RootLayout({ return ( {children} + ); }