Skip to content
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 fallback #1404

Closed
wants to merge 3 commits into from

Conversation

brunomguimaraes
Copy link

Copy link

vercel bot commented Sep 9, 2024

@brunomguimaraes is attempting to deploy a commit to the PostHog Team on Vercel.

A member of the Team first needs to authorize it.

@@ -200,7 +200,10 @@ export class WebVitalsAutocapture {
if (!isUndefined(posthogExtensions)) {
;({ onLCP, onCLS, onFCP, onINP } = posthogExtensions.postHogWebVitalsCallbacks)
}

else if (assignableWindow.postHogWebVitalsCallbacks) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @brunomguimaraes this shouldn't be necessary, what's the problem this solves?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, dang... It's because we load the latest web vitals extension into older clients. What a pain 😭

AFK right now will look at this properly when back

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly @pauldambra !
I've probably should've explain that better on the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

I should have caught it... have opened #1407 to try and work towards making this all safer

@pauldambra
Copy link
Member

hey @brunomguimaraes this wouldn't fix the issue for old clients since they wouldn't have this new code

i've opened #1406 instead, thanks for flagging this though

@pauldambra pauldambra closed this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants