From 4da5241f6c7ea125921499169f2d114f1db6d2fb Mon Sep 17 00:00:00 2001 From: Sarthak Agrawal Date: Sun, 23 Aug 2026 11:59:29 +0530 Subject: [PATCH 1/2] feat(analytics): add the Microsoft Clarity tag alongside PostHog Allows www.clarity.ms in the script-src and connect-src directives. Co-Authored-By: Claude Opus 5 (1M context) --- next.config.ts | 4 ++-- src/app/layout.tsx | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/next.config.ts b/next.config.ts index f8bcdc9..f74328e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -13,10 +13,10 @@ const securityHeaders = [ key: 'Content-Security-Policy', value: [ "default-src 'self'", - "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://us-assets.i.posthog.com", // unsafe-inline/eval required by Next.js + "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://us-assets.i.posthog.com https://www.clarity.ms", // unsafe-inline/eval required by Next.js "style-src 'self' 'unsafe-inline'", "img-src 'self' data: https://avatars.githubusercontent.com https://github.com", - "connect-src 'self' https://api.github.com https://us.i.posthog.com https://us-assets.i.posthog.com", + "connect-src 'self' https://api.github.com https://us.i.posthog.com https://us-assets.i.posthog.com https://www.clarity.ms", "frame-ancestors 'none'", ].join('; '), }, diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e5653ce..893dd6b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -78,6 +78,12 @@ export default function RootLayout({ }} /> {/* fleet-jsonld:end */} + {/* Microsoft Clarity — session replay + heatmaps (additive; PostHog stays) */} +