Skip to content

Commit b92f083

Browse files
committed
fix: update analytics script to include domain and initialize plausible tracking
1 parent 6d77259 commit b92f083

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/app/layout.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ export default function Layout({ children }: { children: ReactNode }) {
2323
<html lang="en" className={inter.className} suppressHydrationWarning>
2424
<body className="flex flex-col min-h-screen">
2525
<Script
26-
src={process.env.NEXT_PUBLIC_ANALYTICS_URL}
27-
data-site-id={process.env.NEXT_PUBLIC_ANALYTICS_SITE_ID}
28-
data-web-vitals="true"
29-
data-track-errors="true"
3026
defer
27+
data-domain={process.env.NEXT_PUBLIC_ANALYTICS_DOMAIN}
28+
src={process.env.NEXT_PUBLIC_ANALYTICS_URL}
29+
/>
30+
<Script
31+
dangerouslySetInnerHTML={{
32+
__html: `window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`,
33+
}}
3134
/>
3235
<RootProvider>{children}</RootProvider>
3336
</body>

0 commit comments

Comments
 (0)