feat: add Core Web Vitals reporting to PostHog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { createRoot } from 'react-dom/client'
|
||||
import { reactErrorHandler } from '@sentry/react'
|
||||
import { HelmetProvider } from 'react-helmet-async'
|
||||
import { PostHogProvider } from '@posthog/react'
|
||||
import { initWebVitals } from './lib/webVitals'
|
||||
import { Toaster } from 'sonner'
|
||||
import './index.css'
|
||||
import App from './App'
|
||||
@@ -22,6 +23,9 @@ if (posthogKey) {
|
||||
})
|
||||
}
|
||||
|
||||
// Start Web Vitals reporting to PostHog
|
||||
initWebVitals()
|
||||
|
||||
createRoot(document.getElementById('root')!, {
|
||||
onUncaughtError: reactErrorHandler(),
|
||||
onCaughtError: reactErrorHandler(),
|
||||
|
||||
Reference in New Issue
Block a user