Demystifying Google’s Core Web Vitals: Cumulative Layout Shift

In the final instalment of our SEO: Demystifying Google’s Core Web Vitals series – where we dissect each of the core web vital metrics in an easy and practical manner to prepare you for what lies ahead – we’ll be discussing Cumulative Layout Shift (CLS), the measurement of visual stability.

Joe Comotto

What is Cumulative Layout Shift (CLS)?

Cumulative Layout Shift (CLS) is the third and final metric that makes up the new Google Core Web Vitals metrics. CLS measures the extent at which elements move around on the page whilst it’s loading and is most likely the area where we are seeing the majority of websites perform poorly. Google explains CLS as  “the sum total of all individual layout shift scores for every unexpected layout shift that occurs during the entire lifespan of the page.”

What this means is that CLS is a measurement of every visible element on the screen that moves from its original position whilst the page is loading. Google says that sites should aim to have a CLS of less than 0.1  and, to ensure you’re hitting this target, they recommend a good threshold to measure is the 75th percentile of page loads, segmented across mobile and desktop devices.

Why is CLS  Important

CLS is important as it helps to quantify how often users experience elements of the page jumping around – a page that has unexpected elemental shifts will provide a poor user experience. It is however important to remember that not all layout shifts are bad, with Google stating it’s only an issue when the shift is unexpected – such as when a page link button unexpectedly shifts resulting in the user performing an undesired outcome.

Here is an example, provided by Google of an unexpected layout shift on their WebDev site:

How do you measure CLS

CLS can be measured both in the lab, or in the field, using the same set of tools used to measure LCP (see our previous article Demystifying Google’s Core Web Vitals: First Input Delay). It’s important to note that, when measuring your CLS using lab tools, pages will load in a synthetic environment meaning values could be less than what users are experiencing in the real world.  We recommend using a combination of lab and field data to understand how your site is performing.

When calculating CLS, there are two key metrics to be aware of – Impact Fraction and Distance Fraction:

  • Impact fraction is the measure of how unstable elements impact the visible area of the screen (viewport) between two frames.
  • Distance fraction is the measure of the distance that unstable elements have moved, relative to the viewport. The Distance fraction is the largest distance any element has moved in a horizontal or vertical direction.

How to Improve CLS

There are common causes behind unexpected layout shift and following some simple guidelines can see some drastic improvements in your CLS score:

  • Size attributes
    • Ensure you always include size attributes on images and videos as a best practice.
    • Alternatively you can use CSS to style any container elements to the same size or aspect ratio before the content is loaded.
  • Advertising
    • Ads are one of the biggest offenders to layout shift issues and can significantly impact the user experience by pushing content down the page with Publishers and networks often using dynamic ad sizes.
    • One solution is to remove the advertising completely from your site, however, if this isn’t an option you can pre-allocate space for the ad using CSS to style the element for the dynamic ad contents load. Much in the same way you would for images and videos.
  • New Content
    • Keep unexpected layout shifts to a minimum by never inserting content (e.g. ads, forms, pop-ups etc.) above existing content unless it’s in response to a user initiated action.

Want to learn more? Explore the series; Demystifying Google’s Core Web Vitals. Or for more information on what the algorithm update will look like, have a read of our previous article Google’s New Search Criteria to familiarize yourself with Page Experience Signals, and what the update will mean for the marketing industry.

Read Next

Global / Industry Insight

What The App Store’s New Features Mean for Marketers?

10th January 2022 – 2 Minutes 31 Seconds read.

The New Year is upon us, and with it Apple announces the recent introduction of two new features, Product Page Optimization and Custom Product Pages. Originally announced back in June at WWDC, Apple has now confirmed that the features are available, meaning app marketers can start building more effective App Store product pages in preparation for 2022 when they get their hands on them via Apple Search Ads. 

Find out how we can help you

With offices around the world, we can build a team perfect for your needs.

Keep up to date with our monthly insight digest