Skip to content

Commit a41fc87

Browse files
Add Vercel Web Analytics to Next.js (#53)
2 parents 38c397e + 1e9ed91 commit a41fc87

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

package-lock.json

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@radix-ui/react-navigation-menu": "^1.2.14",
1919
"@radix-ui/react-slot": "^1.2.3",
2020
"@radix-ui/react-toast": "^1.2.15",
21+
"@vercel/analytics": "^1.6.1",
2122
"class-variance-authority": "^0.7.1",
2223
"clsx": "^2.1.1",
2324
"gray-matter": "^4.0.3",

src/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Metadata } from "next";
22
import { Geist, Geist_Mono } from "next/font/google";
33
import "./globals.css";
4+
import { Analytics } from "@vercel/analytics/next";
45
import { Header } from "@/components/layout/header";
56
import { Footer } from "@/components/layout/footer";
67
import { SkipLinks } from "@/components/ui/skip-links";
@@ -64,6 +65,7 @@ export default function RootLayout({
6465
<Footer />
6566
</div>
6667
</ThemeProvider>
68+
<Analytics />
6769
</body>
6870
</html>
6971
);

0 commit comments

Comments
 (0)