Skip to content

Commit f3e61b6

Browse files
committed
integrate next-plausible for analytics
1 parent 7b1dd09 commit f3e61b6

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"next": "15.2.4",
13+
"next-plausible": "^3.12.4",
1314
"ogl": "^1.0.11",
1415
"prettier": "^3.5.3",
1516
"react": "^19.0.0",

pnpm-lock.yaml

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

src/app/layout.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Footer } from "@/components/layout/footer";
22
import { Header } from "@/components/layout/header";
3+
import PlausibleProvider from "next-plausible";
34
import { Funnel_Display, Geist, Geist_Mono } from "next/font/google";
45
import "./globals.css";
56

@@ -29,13 +30,17 @@ export default async function RootLayout({
2930
<body
3031
className={`${geistSans.variable} ${geistMono.variable} ${funnelDisplay.variable} antialiased overflow-hidden`}
3132
>
32-
<Header />
33-
<main className="w-full h-auto mx-auto">
34-
<div className="flex flex-col mx-auto relative justify-center items-center">
35-
{children}
36-
</div>
37-
</main>
38-
<Footer />
33+
<PlausibleProvider
34+
domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN ?? ""}
35+
>
36+
<Header />
37+
<main className="w-full h-auto mx-auto">
38+
<div className="flex flex-col mx-auto relative justify-center items-center">
39+
{children}
40+
</div>
41+
</main>
42+
<Footer />
43+
</PlausibleProvider>
3944
</body>
4045
</html>
4146
);

0 commit comments

Comments
 (0)