~/3xerries/resources/core-web-vitals-shopify

Core Web Vitals on Shopify: what to fix first

The order we follow to get LCP, INP and CLS into the green on stores with heavy product pages: third-party scripts first, then the hero image, then fonts and layout shifts.

Published 6 min readBy the 3xerries team

On a high-ticket Shopify store, the first thing to fix is almost always third-party scripts (apps, pixels, chat, financing widgets), because they hurt LCP, INP and CLS at the same time. Next comes the main image on the product page and home page, then fonts, and finally the layout shifts caused by injected banners and widgets. Google rates an experience as good when LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1, measured at the 75th percentile of real visits.

What each metric measures and why it matters more at high ticket

LCP (Largest Contentful Paint) measures how long the largest element in the initial viewport takes to render; on a product page it is usually the first gallery photo. INP (Interaction to Next Paint) measures how long the page takes to respond visually to a click or tap: picking a size, opening the cart, switching images. It replaced FID as the official metric in March 2024. CLS (Cumulative Layout Shift) measures how much content moves while the page loads.

A high-ticket store gets fewer sessions and each one is worth more. Buyers compare, come back several times and check details before paying. A gallery that is slow to appear, or an add-to-cart button that jumps just before the tap, will not kill a sale on its own, but it chips away at trust at the exact moment someone is deciding whether to hand you four figures.

The numbers that count are field data (real users, from the Chrome UX Report), which you see in PageSpeed Insights and in the Core Web Vitals report in Search Console. Lighthouse is a lab test: use it to diagnose, not to declare victory.

Step 0: measure by template, not by single URL

Before touching code, split the data by page type: home, collection, product, cart. Search Console groups similar URLs and tells you which group fails and on which metric. The usual picture is a home page that looks fine and a product page, where the purchase is actually decided, sitting in the red.

Always measure mobile first. Most INP problems only show up on mid-range phones, whose processors are several times slower than the team’s laptops.

Step 1: apps and third-party scripts

Every app that adds something visible to the storefront tends to load its own JavaScript, sometimes its own CSS, and sometimes calls to its own servers. Reviews, quizzes, upsells, chat, email pop-ups, pay-later widgets, ad pixels. Each one looks light on its own; together they fight for the browser’s main thread right when the customer is trying to interact.

What to do

  • List every script the product page loads (Chrome DevTools Network tab, filtered to external domains) and note which app adds it.
  • Remove what is not used. Uninstalling an app does not always delete the code it pasted into the theme; check the snippets.
  • Delay anything not needed to buy: chat, pop-ups, surveys. Load them after the first interaction or when the browser is idle.
  • Move tracking pixels to Shopify Customer events (Web Pixels), which run sandboxed and do not block rendering.

We go deeper in how to audit Shopify apps and scripts.

Step 2: the main image (LCP)

On most stores the LCP element is an image: the home hero or the first product photo. The failures repeat: the image is lazy-loaded even though it sits at the top, it is served far larger than it is displayed, or it depends on a JavaScript carousel that has to boot before showing it.

  • Use the Liquid image_url and image_tag filters with real widths and sizes so the browser picks the right file.
  • On the first visible image: loading: 'eager' and fetchpriority: 'high'. Lazy-load the rest of the gallery.
  • Render the first image in the server HTML; let the carousel mount on top of it, not the other way round.
  • Hero videos: use a poster image as the LCP element and load the video afterwards.

Step 3: fonts

Luxury brands often use custom typefaces in several weights. Each font file is one more request, and if the main text waits for the font, LCP is delayed whenever the LCP element is a headline.

  • Limit weights to the ones actually used; two or three are usually enough.
  • Use WOFF2 and font-display: swap (on Shopify, font_face with font_display: 'swap').
  • Preload only the font for above-the-fold text, not all of them.
  • Tune the fallback font (size-adjust) so the swap does not move text around.

Step 4: layout shifts (CLS)

CLS on Shopify rarely comes from the base theme. It comes from what gets injected later: announcement bars, review stars that appear above the price, cookie notices, free-shipping banners, financing widgets under the buy button.

  • Reserve each widget’s space with a CSS minimum height before it loads.
  • Make sure every image has width and height (image_tag adds them for you).
  • Show notices as overlays (fixed) instead of pushing content down.

Step 5: interaction (INP)

If INP is still high after the previous steps, the problem is the code that runs on interaction: variant pickers that re-render the whole product page, cart drawers that fetch and paint too much, or analytics scripts hooked into every click.

  • Record a slow interaction in the DevTools Performance panel with 4x CPU throttling and look for long tasks (over 50 ms).
  • Update what the customer sees first (price, button) and defer the rest of the work.
  • Break long tasks up by yielding to the main thread between steps.

If the theme is so patched that every fix breaks something else, it may be time for a different foundation: see custom theme or premium template.

Quick checklist

  • Field data reviewed by template in Search Console, on mobile.
  • Inventory of third-party scripts on the product page, each with its owning app.
  • Unused apps removed and their leftover code deleted from the theme.
  • Chat, pop-ups and surveys loading after the first interaction.
  • First visible image loading eagerly at high priority; the rest lazy.
  • Fonts in WOFF2, with swap, and only the weights you need.
  • Space reserved for every widget that is injected late.
  • Slow interactions recorded and long tasks broken up.

Frequently asked questions

01

What Core Web Vitals values count as good?

According to Google: LCP of 2.5 seconds or less, INP of 200 milliseconds or less and CLS of 0.1 or less, measured at the 75th percentile of real visits, separately for mobile and desktop.

02

Do Core Web Vitals affect Google rankings?

Yes, they are part of the page experience signals, but Google has said content relevance carries more weight. For a store, the more direct impact is usually on conversion and on ad costs, not only on rankings.

03

Why does Lighthouse give me a good score while Search Console says I fail?

Lighthouse is a lab test on a simulated device and network. Search Console uses data from real users over the last 28 days, on their own phones and connections. When they disagree, field data is what counts.

04

Will switching themes fix Core Web Vitals?

Not on its own. If the problem is apps and third-party scripts, they move to the new theme with you. Audit the scripts first, then decide whether the theme is the real limit.

05

How long until an improvement shows in Search Console?

Field data is a rolling 28-day window, so a fix shipped today is fully reflected in about four weeks. PageSpeed Insights shows the trend sooner.

Free technical audit

Want to know what is slowing your store down?

45 minutes with a senior engineer reviewing your live store: performance, apps, scripts and theme. You leave with a prioritised list, no strings attached.

Book the free audit

Related articles

All resources

5 min read

Shopify app bloat: how to audit your apps

A five-step method to inventory apps and scripts, measure what each one costs in speed and money, and decide what to keep, what to remove and what to rebuild with native Shopify features.

5 min read

Custom Shopify theme or premium template?

A decision framework with concrete signals for whether to stay on a premium template, customise it heavily or build a custom theme, with the costs and risks of each path.