-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: web vitals 3000 #1401
feat: web vitals 3000 #1401
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +12.2 kB (+1.04%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
const postHogWebVitalsCallbacks = { | ||
onLCP, | ||
onCLS, | ||
onFCP, | ||
onINP, | ||
} | ||
|
||
assignableWindow.postHogWebVitalsCallbacks = postHogWebVitalsCallbacks | ||
assignableWindow.__PosthogExtensions__ = assignableWindow.__PosthogExtensions__ || {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every time we add random things onto the window an angel dies (probably)
so I'm slowly moving things onto a single global object on window
this will mean we can start to type that object and have fewer (window as any)
flying around the place
or at least web vitals 1000
see PostHog/posthog#24597
this PR
adds sample rate config (supporting client or remote config)