Skip to content

Commit

Permalink
feat: enable vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
csuvajit committed Oct 25, 2024
1 parent 221313f commit f006fa5
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -108,6 +110,9 @@ export default async function RootLayout({
<ContextWrapper user={user}>{children}</ContextWrapper>
</ThemeProvider>
</AppRouterCacheProvider>

<Analytics />
<SpeedInsights />
</body>
</html>
);
Expand Down
64 changes: 64 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f006fa5

Please sign in to comment.