From 74bd0dc4c6062f9862d2533bd6201e0543a1ddb0 Mon Sep 17 00:00:00 2001 From: Jonathan Carnos Date: Tue, 21 Jul 2026 19:43:00 +0300 Subject: [PATCH] Fix Google Analytics loading strategy --- apps/packid/app/layout.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/packid/app/layout.tsx b/apps/packid/app/layout.tsx index 9d7accf..ab86249 100644 --- a/apps/packid/app/layout.tsx +++ b/apps/packid/app/layout.tsx @@ -23,7 +23,8 @@ const geistMono = Geist_Mono({ subsets: ["latin"], }); -const GOOGLE_ANALYTICS_ID = "G-GEG23Y1E0M"; +const GOOGLE_ANALYTICS_ID = + process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID || "G-GEG23Y1E0M"; export const metadata: Metadata = { title: "Packid - Agent IA Recrutement", @@ -38,7 +39,11 @@ export default function RootLayout({ return {children}; } -async function AuthenticatedLayout({ children }: { children: React.ReactNode }) { +async function AuthenticatedLayout({ + children, +}: { + children: React.ReactNode; +}) { const headerStore = await headers(); const pathname = headerStore.get("x-packid-pathname") ?? "/"; const isApplicationPage = isApplicationPagePath(pathname); @@ -80,9 +85,9 @@ async function AuthenticatedLayout({ children }: { children: React.ReactNode })