From 1f80571b1ff217dc92b660a936c02b5f49d07f0b Mon Sep 17 00:00:00 2001 From: Tudor Date: Tue, 21 Jul 2026 16:03:18 +0100 Subject: [PATCH] feat(analytics): load Umami heatmap recorder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the Umami session recorder (recorder.js) that powers heatmaps, alongside the existing analytics tracker. Loaded via next/script with the same data-domains guard as the main tracker so it only fires on the production hostnames — staging runs the same image under a different host and must not feed the heatmap. Cookieless: recorder.js uses Umami's server-side session model (no cookie or local storage on the device), so it adds no new PECR consent trigger. Verified with tsc --noEmit and next build. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB --- nextjs-app/app/layout.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nextjs-app/app/layout.tsx b/nextjs-app/app/layout.tsx index 82e7c55..c72cd69 100644 --- a/nextjs-app/app/layout.tsx +++ b/nextjs-app/app/layout.tsx @@ -85,6 +85,14 @@ export default function RootLayout({ data-performance="true" strategy="afterInteractive" /> + {/* Heatmap / session recorder — same data-domains guard so staging + (same image, different host) never feeds the heatmap. */} +