Optimization

Cumulative Layout Shift (CLS) optimization for Shopify

Cumulative Layout Shift, or CLS, measures how much content shifts while a page loads. We find out what jumps in your Shopify store and fix it in the theme.

How to recognize a layout shift

Few people know the technical term, but everyone knows the effect. You open a page and start reading. Then an image loads at the top, and the text slides down a hand’s width. Or you want to tap “Add to cart,” and at that very moment a notice pushes in between. You hit something else.

Typical signs in a store:

  • Content jumps back and forth while loading.
  • A menu is briefly visible expanded although it should be closed.
  • A bar or banner pushes the whole page down.
  • The font changes after a moment, and lines wrap differently.

On a smartphone this is especially annoying, because even a small shift puts your thumb in the wrong place.

What the CLS score tells you

Cumulative Layout Shift is a metric from Google. It sums up how much visible content shifts unexpectedly and how far. The smaller the number, the calmer the page builds.

Good
A CLS score of 0.1 or less.
Poor
A CLS score above 0.25. In between, there is room for improvement.
Measurement
With real visitors, separately for mobile devices and desktop.
Context
Alongside load time and responsiveness, CLS is one of the three Core Web Vitals with which Google rates the usability of a page.

In the Core Web Vitals report, Search Console shows you which page types are affected. If product or collection pages are marked there as needing improvement or poor, a closer look is worthwhile.

Where the jumps in Shopify stores come from

With Shopify, the server isn’t the cause. The cause lies in the theme, the content or the apps:

  • Images and videos without a fixed space. The browser doesn’t know how tall the image will be and pushes the rest down once it arrives.
  • Fonts. The page first appears in a fallback font. When the actual font has loaded, line lengths and spacing change.
  • App elements. Review stars, notice bars or counters are inserted into the page afterward.
  • Content loaded later. Sliders, recommendations or banners appear later and displace what was already visible.

The solution is often unspectacular. If, say, a free shipping bar only appears once the rest of the page is already in place, we reserve the space for it in the theme from the start. The bar still comes a little later, but the page no longer moves.

What we do about layout shifts

  1. Measure. We look at the values in Search Console and PageSpeed Insights and reproduce the jumps on the affected pages.
  2. Find the cause. We assign each shift to an element: image, font, app or theme section.
  3. Fix. We give images fixed aspect ratios, reserve space for elements that load later and adjust how fonts are loaded.
  4. Verify. Google’s measurements are based on visits over a longer period. The report in Search Console therefore catches up only with a delay. We check directly after the change in a test and again later in the report.

When a new theme is worth more

With themes that are many years old and have been modified often, the causes are sometimes spread across the whole code. Then a theme redesign on a current foundation is the shorter route. We tell you that after the analysis, before any further effort is spent.

If the jump is tied to an app that can’t deliver its element any other way, two options remain: create space in the theme or replace the app. We show you both.

CLS and page speed go together

A store that jumps often loads slowly too, because both frequently have the same causes. That is why, in a CLS optimization, we also look at page speed.

FAQ

Frequently asked questions

What is a good CLS score?

Google considers a value of 0.1 or less good and a value above 0.25 poor. It is measured with real visitors, separately for mobile devices and desktop.

Where can I see my store's CLS score?

In Google Search Console in the Core Web Vitals report, and in PageSpeed Insights when you enter the address of a page there. We're happy to look at the values together with you.

Does CLS affect my Google ranking?

CLS is one of the Core Web Vitals, which Google uses as one of many signals. A good score doesn't replace good content. The more direct benefit is for your visitors: a store that stays calm while loading is easier to use.

Do I need a new theme for good CLS scores?

Usually not. Often it is just a few spots: images without a fixed space, a font that loads late or an app's element. A new theme only makes sense once the old one is outdated overall.

Can an app make the CLS score worse?

Yes. Apps that insert bars, reviews or notices into the page after the fact are a common cause. Often space can be reserved for the element in the theme. If that isn't possible, we tell you what options remain.

Contact

Does your store jump while loading?

Tell us briefly what you need. You will get a reply from someone who would also build your project.

Phone
+49 (0) 30 – 40 36 38 90Mon–Fri 9:00 a.m.–4:30 p.m. (CET)