From c2c7d196b406b0c08116ff0c29adcd96cd64e3de Mon Sep 17 00:00:00 2001 From: Sarthak Agrawal Date: Sun, 23 Aug 2026 12:00:11 +0530 Subject: [PATCH 1/2] feat(analytics): add the Microsoft Clarity tag alongside PostHog Allows www.clarity.ms in the CSP script-src. Co-Authored-By: Claude Opus 5 (1M context) --- next.config.ts | 2 +- src/app/layout.tsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index c40af53..4dfcf45 100644 --- a/next.config.ts +++ b/next.config.ts @@ -16,7 +16,7 @@ const securityHeaders = [ // unsafe-eval required by Next.js dev + some libs. // static.cloudflareinsights.com is the Cloudflare Web Analytics beacon // that Cloudflare injects automatically on the rolepatch.com zone. - "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.cloudflareinsights.com https://us-assets.i.posthog.com", + "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.cloudflareinsights.com https://us-assets.i.posthog.com https://www.clarity.ms", "style-src 'self' 'unsafe-inline'", "img-src 'self' data: https:", "font-src 'self'", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 76133d3..34f9cca 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -121,6 +121,12 @@ export default function RootLayout({ }} /> {/* fleet-jsonld:end */} + {/* Microsoft Clarity — session replay + heatmaps (additive; PostHog stays) */} +