Skip to content

Commit ba7204b

Browse files
committed
feat: Add clarity analytics script to the root layout for enhanced tracking
1 parent 4f2dfa9 commit ba7204b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

app/layout.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import Script from "next/script";
23
import "./globals.css";
34
import { Provider } from "../components/ui/provider";
45

@@ -14,6 +15,15 @@ export default function RootLayout({
1415
}>) {
1516
return (
1617
<html lang="en" suppressHydrationWarning>
18+
<head>
19+
<Script id="clarity-analytics" strategy="afterInteractive">
20+
{`(function(c,l,a,r,i,t,y){
21+
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
22+
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
23+
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
24+
})(window, document, "clarity", "script", "sq8dhiettj");`}
25+
</Script>
26+
</head>
1727
<body>
1828
<Provider>{children}</Provider>
1929
</body>

0 commit comments

Comments
 (0)