auto-claude: subtask-2-3 - Add web-vitals reporting to layout for Core Web Vitals monitoring

- Create WebVitals client component in src/components/analytics/
- Track LCP, INP, CLS, FCP, and TTFB metrics
- Log metrics to console in development mode
- Send metrics to Google Analytics when available
- Add WebVitals component to root layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 00:19:42 +01:00
co-authored by Claude Opus 4.5
parent a6d0e28990
commit ab669a4dc9
3 changed files with 70 additions and 0 deletions
+3
View File
@@ -6,6 +6,7 @@ import { locales, localeMetadata, seoKeywords, type Locale } from '@/i18n/config
import type { Metadata } from 'next';
import { Header, Footer, GlobalBackground } from '@/components/layout';
import { PersonJsonLd, ProfessionalServiceJsonLd, OrganizationJsonLd, WebSiteJsonLd } from '@/components/seo';
import { WebVitals } from '@/components/analytics';
import '../globals.css';
const inter = Inter({
@@ -123,6 +124,8 @@ export default async function LocaleLayout({ children, params }: Props) {
<Footer />
</div>
</NextIntlClientProvider>
{/* Core Web Vitals monitoring */}
<WebVitals />
</body>
</html>
);