fix(analytics): Resolve Umami proxy 500 error and empty server events

This commit is contained in:
2026-02-18 23:34:56 +01:00
parent f344c8b0d1
commit fc0d2e55c6
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(