Skip to content

Commit

Permalink
📈 Add vercel analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
iqfareez committed Jan 11, 2024
1 parent b5a3bb9 commit 2de8f18
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/[locale]/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@/app/globals.css'
import { ThemeProvider } from "@/context/ThemeProvider";
import i18nConfig from '@/i18nConfig';
import { dir } from 'i18next';
import { Analytics } from '@vercel/analytics/react';

const poppins = Poppins({ subsets: ["latin"], weight: "400", display: "swap" });

Expand Down Expand Up @@ -31,6 +32,7 @@ export default function RootLayout({ children, params: { locale } }) {
<body className={poppins.className}>
<ThemeProvider attribute="class" enableSystem>
{children}
<Analytics />
</ThemeProvider>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export function middleware(request) {

// applies this middleware only to files in the app directory
export const config = {
matcher: '/((?!api|static|.*\\..*|_next).*)'
matcher: '/((?!api|static|.*\\..*|_next|_vercel).*)'
};
14 changes: 14 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@mdx-js/react": "^3.0.0",
"@next/mdx": "^14.0.4",
"@types/mdx": "^2.0.10",
"@vercel/analytics": "^1.1.1",
"i18next": "^23.7.15",
"i18next-resources-to-backend": "^1.2.0",
"next": "14.0.4",
Expand Down

0 comments on commit 2de8f18

Please sign in to comment.