[Layout Shift Metrics] Does welcome popup impact CLS?

89 views
Skip to first unread message

Bella Gao

unread,
Apr 20, 2021, 11:30:32 PM4/20/21
to web-vitals-feedback
Hi Google,

Our website has a welcome popup when customers visit the website at the first time.

It is a different layer from our main page layer. Does this popup impact CLS?

Looking forward to your feedback!

Michal Mocny

unread,
Apr 21, 2021, 10:13:42 AM4/21/21
to Bella Gao, web-vitals-feedback
Adding and removing dom content does not itself cause layout shifts.  And, after users interact with the page (for example, to dismiss the popup), any shifts that happen within 500ms will be ignored from CLS.  But, the easiest way to know for sure is to just test the page and see!

If you use a lab tool like lighthouse / web page test / page speed insights, you will only automate and measure the loading portion of CLS without user interactions, so you won't know if the popup dismissal leads to layout shifts.  I think the best way to test CLS is to interact with the page and see what CLS is reported yourself.  You can use the Web Vitals Chrome Extension, or, try to use the Measure using JavaScript, perhaps just from the DevTools console.

--
You received this message because you are subscribed to the Google Groups "web-vitals-feedback" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-vitals-feed...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web-vitals-feedback/cb5b13fb-5b35-43d4-a240-de81421a391an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages