Skip to content

Commit 796f37a

Browse files
committed
feat: add Vercel Web Analytics to the web app
- Add @vercel/analytics and render <Analytics /> in the root layout. It's privacy-friendly (no cookies) and a no-op unless deployed on Vercel with Analytics enabled, so it doesn't affect the static build or non-Vercel hosting. - Reformat globals.css multi-value CSS properties to satisfy the current Prettier (pre-existing drift, unrelated edit).
1 parent a98766c commit 796f37a

4 files changed

Lines changed: 53 additions & 3 deletions

File tree

web/app/globals.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
--muted: #7e8ca3;
2020
--line: #25324d;
2121

22-
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
23-
sans-serif;
22+
--font-sans:
23+
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
2424
--font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
2525
}
2626

@@ -185,7 +185,8 @@
185185
}
186186
}
187187
.flowgrid {
188-
background-image: linear-gradient(var(--line) 1px, transparent 1px),
188+
background-image:
189+
linear-gradient(var(--line) 1px, transparent 1px),
189190
linear-gradient(90deg, var(--line) 1px, transparent 1px);
190191
background-size:
191192
56px 56px,

web/app/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import { Analytics } from "@vercel/analytics/next";
23
import "./globals.css";
34
import {
45
SITE_URL,
@@ -100,6 +101,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
100101
// Structured data is static, build-time JSON — safe to inline.
101102
dangerouslySetInnerHTML={{ __html: JSON.stringify(JSON_LD) }}
102103
/>
104+
{/* Vercel Web Analytics — privacy-friendly (no cookies). A no-op unless
105+
deployed on Vercel with Analytics enabled, so it won't affect the
106+
static build or non-Vercel hosting. */}
107+
<Analytics />
103108
</body>
104109
</html>
105110
);

web/package-lock.json

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

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"next": "16.2.9",
1717
"react": "19.2.7",
1818
"react-dom": "19.2.7",
19+
"@vercel/analytics": "^2.0.1",
1920
"gray-matter": "^4.0.3",
2021
"react-markdown": "^10.1.0",
2122
"remark-gfm": "^4.0.1",

0 commit comments

Comments
 (0)