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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user