posthog.com icon indicating copy to clipboard operation
posthog.com copied to clipboard

Bug Report: CLS (Content Layout Shift) issue on mobile

Open andyvan-ph opened this issue 2 years ago • 3 comments

Google is reporting a big spike in Content Layout Shift (CLS) issues on content pages. This is Core Web Vitals / SEO problem... so many acronyms!

Anyway, this could impact our ranking on these pages, so good to fix when we can.

Screenshot 2023-12-12 at 16 55 48

This screen recording suggests it's caused by the Community Sign-in CTA loading above the content and then disappearing once the body content has loaded – I've slowed this down a bit so you can see it.

https://github.com/PostHog/posthog.com/assets/92976667/19aa13fb-a52b-48e7-802a-c639f7648535

Edit: It also appears like the filtering appears twice there. Not sure what that's about.

andyvan-ph avatar Dec 12 '23 17:12 andyvan-ph

Would a loading state work better here, since we can't load the content before the page frame renders?

corywatilo avatar Dec 22 '23 15:12 corywatilo

Worth a shot. I have a feeling it might impact other elements like LCP, but worth trying to seeing what happens.

andyvan-ph avatar Jan 02 '24 10:01 andyvan-ph

https://github.com/PostHog/posthog.com/assets/154479/d7818e47-ed3b-4872-8963-7080dd67d805

https://posthog.com/tutorials/nextjs-ab-tests

corywatilo avatar Feb 14 '24 02:02 corywatilo