fix(analytics): Resolve Umami proxy 500 error and empty server events
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m58s
Build & Deploy / 🏗️ Build (push) Successful in 4m10s
Build & Deploy / 🚀 Deploy (push) Successful in 30s
Build & Deploy / 🧪 Smoke Test (push) Failing after 56s
Build & Deploy / ⚡ Lighthouse (push) Successful in 2m48s
Build & Deploy / 🔔 Notify (push) Successful in 1s

This commit is contained in:
2026-02-18 23:34:56 +01:00
parent 9d935ce03b
commit 61daeaf03f
3 changed files with 25 additions and 8 deletions

View File

@@ -96,10 +96,8 @@ export default async function Layout(props: {
});
}
const { after } = await import('next/server');
after(() => {
serverServices.analytics.trackPageview();
});
// Server-side analytics tracking removed to prevent duplicate/empty events.
// Client-side AnalyticsProvider handles all pageviews.
} catch {
if (process.env.NODE_ENV !== 'production' || !process.env.CI) {
console.warn(