Core Web Vitals for Vibe-Coded Landing Pages

Your landing page feels instant when you test it. Of course it does: you are on a fast laptop, on good wifi, with the page already cached from your last fifty visits. Google does not grade that visit. It grades your real visitors, on mid-range phones, on spotty connections, seeing the page for the first time, and it grades them with three numbers called Core Web Vitals.
Those numbers carry money. When Vodafone ran an A/B test where the only difference was Web Vitals optimization, the version with a 31% better Largest Contentful Paint produced 8% more sales, an 11% better cart-to-visit rate, and a 15% better lead-to-visit rate (Google’s case study has the full numbers). Speed is not a polish item. It is part of the product.
The three numbers in plain English
Google publishes the definitions and thresholds on web.dev. Each one is measured on real visits, at the 75th percentile: not your average visitor, your unluckier one. To see your own page’s numbers, paste its URL into PageSpeed Insights and look at the real-user section.
| Metric | What it measures | Passing score (at p75) |
|---|---|---|
| LCP (Largest Contentful Paint) | How long the biggest element takes to appear | 2.5 seconds or less |
| INP (Interaction to Next Paint) | How long until the page visibly reacts to a tap | 200 milliseconds or less |
| CLS (Cumulative Layout Shift) | How much the page jumps while loading | 0.1 or less |
LCP, Largest Contentful Paint: 2.5 seconds or less. How long the biggest thing on the screen (almost always your hero image or headline) takes to appear. This is the “is this site alive?” number.
INP, Interaction to Next Paint: 200 milliseconds or less. When someone taps your signup button, how long until the page visibly reacts. INP replaced the older FID metric in 2024, and it is stricter: it watches every interaction, not just the first.
CLS, Cumulative Layout Shift: 0.1 or less. Whether the page jumps while loading. You have felt this one: you go to tap a button, an image finishes loading above it, the button dives, and you tap the wrong thing.
Why AI-built landing pages fail all three
The AI that generated your page was optimizing for “looks right in the preview,” and the preview hides exactly the things the vitals measure. The same three mistakes show up again and again:
The hero image is treated like a decoration. A common AI default is loading="lazy" on every image, because lazy loading is a best practice. For the hero it is the opposite: the biggest element on the page is told to load last, and LCP eats the delay. The hero should load first, with fetchpriority="high", sized properly, and ideally cached well for repeat visits.
Images have no dimensions. Without width and height, the browser reserves zero space for an image, then shoves everything down when it arrives. That is a common cause of CLS, and it is a one-attribute fix per image.
The <head> is a traffic jam. The AI adds the analytics snippet, the chat widget, and the font loader exactly where the docs’ quickstart shows them: as synchronous scripts in the head. Each one freezes rendering while it downloads; defer or async lets the page paint first. Stylesheets block rendering too, including font CSS from a CDN: use font-display: swap and a preconnect to the font origin so text shows in a system font while the webfont loads.
None of these are visible on your laptop. All of them are visible to Google’s 75th-percentile visitor.
The biggest one: the page is not there until JavaScript runs
If your landing page came from Lovable, Bolt or v0, its built index.html is an empty <div id="root"> and a module script. Nothing appears until the JavaScript bundle downloads and runs, and no markup fix changes that: client-side rendering itself is the LCP problem. The fix is to prerender the landing page (Astro, Next.js and most AI app builders can emit static HTML for a route that needs no per-user data), or to keep the landing page a static route in front of the app.
It also means auditing the built file proves nothing: the hero is not in it. Audit the rendered page instead. Open the live page, copy what the browser actually rendered (DevTools Console: copy(document.documentElement.outerHTML), paste into rendered.html), and point the audit at that file. Playwright’s page.content() and the LCP element a Lighthouse report names do the same job.
Prove it with runnable tests
Save this as test_landing_page.py in an empty folder and run python3 test_landing_page.py. It holds two versions of a landing page, the way the AI first writes it and the way it should be, standard library only, and audits whichever one the marked line selects.
"""Behavior tests for a landing page's Core Web Vitals. Run: python3 test_landing_page.py"""import unittestfrom html.parser import HTMLParser
PAGE_BEFORE = """<html><head><script src="https://cdn.example.com/widget.js"></script></head><body><img src="hero.png" loading="lazy" data-hero><img src="logo.png" width="120" height="40"></body></html>"""
PAGE_AFTER = """<html><head><script src="https://cdn.example.com/widget.js" defer></script></head><body><img src="hero.png" width="1344" height="756" fetchpriority="high" data-hero><img src="logo.png" width="120" height="40"></body></html>"""
# Which page the site serves. FIX (after the first run): point it at PAGE_AFTER.# For your real page, audit the RENDERED HTML, not the built file:# PAGE_HTML = open("rendered.html").read()PAGE_HTML = PAGE_BEFORE
NO_IMAGES = "no images in this HTML; if JavaScript renders the page, audit the rendered HTML (below)"
class Audit(HTMLParser): def __init__(self): super().__init__() self.images = [] self.head_scripts = [] self._in_head = False
def handle_starttag(self, tag, attrs): attrs = dict(attrs) if tag == "head": self._in_head = True if tag == "img": self.images.append(attrs) if tag == "script" and self._in_head and "src" in attrs: self.head_scripts.append(attrs)
def handle_endtag(self, tag): if tag == "head": self._in_head = False
def audit(html): parser = Audit() parser.feed(html) return parser
class CoreWebVitalsTests(unittest.TestCase): def setUp(self): self.page = audit(PAGE_HTML)
def test_hero_loads_first(self): # LCP: the hero is what the user waits for; never lazy-load it. if not self.page.images: self.fail(NO_IMAGES) heroes = [img for img in self.page.images if "data-hero" in img] self.assertTrue(heroes, "mark the hero image with data-hero (or use the LCP element Lighthouse names)") hero = heroes[0] self.assertNotEqual(hero.get("loading"), "lazy", "the hero image is lazy-loaded, so it loads last") self.assertEqual(hero.get("fetchpriority"), "high", "the hero image is not marked as the priority")
def test_images_cannot_shift_the_layout(self): # CLS: an image without dimensions collapses to zero, then shoves the page. if not self.page.images: self.fail(NO_IMAGES) for img in self.page.images: self.assertIn("width", img, f"{img.get('src')} has no width") self.assertIn("height", img, f"{img.get('src')} has no height")
def test_third_party_scripts_cannot_block_first_paint(self): # INP/LCP: a synchronous script in <head> freezes the page while it loads. # type="module" scripts are deferred by default, so they cannot block. for script in self.page.head_scripts: non_blocking = ("defer" in script or "async" in script or script.get("type") == "module") self.assertTrue(non_blocking, f"{script.get('src')} blocks rendering")
if __name__ == "__main__": unittest.main()The first run fails the way your visitors experience it, on all three vitals at once:
FAIL: test_hero_loads_first (__main__.CoreWebVitalsTests)AssertionError: 'lazy' == 'lazy' : the hero image is lazy-loaded, so it loads lastFAIL: test_images_cannot_shift_the_layout (__main__.CoreWebVitalsTests)AssertionError: 'width' not found in {'src': 'hero.png', 'loading': 'lazy', 'data-hero': None} : hero.png has no widthFAIL: test_third_party_scripts_cannot_block_first_paint (__main__.CoreWebVitalsTests)AssertionError: False is not true : https://cdn.example.com/widget.js blocks rendering
Ran 3 tests in 0.001sFAILED (failures=3)Now flip the one marked line to PAGE_AFTER and run again:
Ran 3 tests in 0.001sOKThe audit finds the hero by a data-hero attribute you add once, because “the first image on the page” is a guess: a nav logo above the hero is the most common layout, and it fools an images[0] check while the hero still loads last. That exact page, a logo with fetchpriority="high" above a lazy hero, now fails the way it should:
FAIL: test_hero_loads_first (__main__.CoreWebVitalsTests)AssertionError: 'lazy' == 'lazy' : the hero image is lazy-loaded, so it loads last
FAILED (failures=1)Point the same audit at a raw Lovable or Bolt build and it tells you the truth instead of crashing:
FAIL: test_hero_loads_first (__main__.CoreWebVitalsTests)AssertionError: no images in this HTML; if JavaScript renders the page, audit the rendered HTML (below)
Ran 3 tests in 0.001sFAILED (failures=2)The type="module" bundle correctly passes the script test, because module scripts are deferred by default. These tests are written against behaviors your visitors feel (the hero arrives first, the layout holds still, scripts cannot freeze the page), not implementation details, so the next time the AI regenerates the page and reintroduces loading="lazy" on the hero, a test fails instead of your LCP score. And be honest about the limit: these tests protect the markup habits. The real numbers come from real visits.
The hand check: read your field data
Paste your landing page URL into PageSpeed Insights and scroll past the lab score to the real-user section (the Chrome UX Report): that is what visitors experienced over the last 28 days, and those are the numbers Google uses. New sites usually have no field data at all, because CrUX needs enough visits to report. Until then, use the lab result plus your own analytics: Cloudflare Web Analytics and Vercel Speed Insights both report p75 LCP, INP and CLS from your actual visitors, and Search Console’s Core Web Vitals report tracks the same field data once you have traffic.
This site is the worked example. On December 6 its own Cloudflare Web Analytics showed a p75 CLS of 1.0 and an LCP of about 2.4 seconds, caused by a late-loading scrollbar and images without dimensions. Both were fixed the same day.
The prompt to paste
Audit my landing page for Core Web Vitals. Find the LCP element and check whether it is lazy-loaded, oversized, or missing fetchpriority=“high”. List every image without width and height attributes. List every synchronous script or stylesheet in the head. For each finding, show the current markup and the fixed markup. Do not change anything else on the page.
A slow landing page is one of the six things that break when your app meets real users, and it breaks before those users ever see the app.
The Get AI Native ebook goes deeper on this. It is free, and the expected launch is around Christmas. Join the waitlist on the homepage.