Skip to content

Commit

Permalink
add vercel analytics package
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholeuf committed Feb 18, 2024
1 parent af19373 commit 6ba175a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.9",
"@mui/material-nextjs": "^5.15.9",
"@vercel/analytics": "^1.2.0",
"next": "^14.1.0",
"next-cloudinary": "^5.20.0",
"react": "^18.2.0",
Expand Down
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { Metadata } from 'next';
import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter';
import { getCldOgImageUrl } from 'next-cloudinary';
import { Analytics } from '@vercel/analytics/react';

import AppLayout from '@/components/AppLayout';
import getBaseUrl from '@/app/lib/getBaseUrl';
Expand Down Expand Up @@ -57,6 +58,7 @@ const RootLayout: React.FC<RootLayoutProps> = ({ children }) => {
<AppRouterCacheProvider options={{ enableCssLayer: true }}>
<AppLayout>{children}</AppLayout>
</AppRouterCacheProvider>
<Analytics />
</body>
</html>
);
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,23 @@ __metadata:
languageName: node
linkType: hard

"@vercel/analytics@npm:^1.2.0":
version: 1.2.0
resolution: "@vercel/analytics@npm:1.2.0"
dependencies:
server-only: "npm:^0.0.1"
peerDependencies:
next: ">= 13"
react: ^18 || ^19
peerDependenciesMeta:
next:
optional: true
react:
optional: true
checksum: 10c0/ee6c541ce0e5ee5ad9c46d808db9c053c5fa8930897f59edf9a0cd5a30f62b06dd4120585fe9ecd9918f032cf713d315db22126615e9b6d65a43980fc71e0bf3
languageName: node
linkType: hard

"abab@npm:^2.0.6":
version: 2.0.6
resolution: "abab@npm:2.0.6"
Expand Down Expand Up @@ -6564,6 +6581,13 @@ __metadata:
languageName: node
linkType: hard

"server-only@npm:^0.0.1":
version: 0.0.1
resolution: "server-only@npm:0.0.1"
checksum: 10c0/4704f0ef85da0be981af6d4ed8e739d39bcfd265b9c246a684060acda5642d0fdc6daffc2308e71e2682c5f508090978802eae0a77623c9b90a49f9ae68048d6
languageName: node
linkType: hard

"set-function-length@npm:^1.1.1":
version: 1.1.1
resolution: "set-function-length@npm:1.1.1"
Expand Down Expand Up @@ -7595,6 +7619,7 @@ __metadata:
"@types/react": "npm:^18"
"@types/react-dom": "npm:^18"
"@types/react-test-renderer": "npm:^18"
"@vercel/analytics": "npm:^1.2.0"
eslint: "npm:^8.55.0"
eslint-config-next: "npm:^14.0.3"
eslint-plugin-prettier: "npm:^5.0.1"
Expand Down

0 comments on commit 6ba175a

Please sign in to comment.