fix: umami
All checks were successful
Build & Deploy / 🔍 Prepare Environment (push) Successful in 12s
Build & Deploy / 🧪 QA (push) Successful in 1m24s
Build & Deploy / 🏗️ Build (push) Successful in 5m58s
Build & Deploy / 🚀 Deploy (push) Successful in 15s
Build & Deploy / 🔔 Notifications (push) Successful in 2s

This commit is contained in:
2026-02-09 19:30:52 +01:00
parent f7685fdb2f
commit 9eaaa798a3
5 changed files with 20 additions and 4 deletions

View File

@@ -6,6 +6,8 @@ import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import { notFound } from "next/navigation";
import { LazyMotion, domAnimation } from "framer-motion";
import AnalyticsProvider from "@/components/analytics/AnalyticsProvider";
import { config } from "@/lib/config";
const inter = Inter({
subsets: ["latin"],
@@ -108,10 +110,12 @@ export default async function RootLayout({
// Track pageview on the server
// This is safe to call here because layout is a Server Component
const services = (
const serverServices = (
await import("@/lib/services/create-services.server")
).getServerAppServices();
services.analytics.trackPageview();
// Track server-side (initial load)
serverServices.analytics.trackPageview("/");
return (
<html lang={locale} className={`${inter.variable}`}>
@@ -123,6 +127,7 @@ export default async function RootLayout({
</head>
<body className="antialiased">
<NextIntlClientProvider messages={messages}>
<AnalyticsProvider websiteId={config.analytics.umami.websiteId} />
<LazyMotion features={domAnimation}>
<Layout>{children}</Layout>
</LazyMotion>