Page speed for conversions
Focus on what delays the first screen and the first click: the hero image, fonts, render-blocking code and third-party tags. A faster page nobody can convert on is not the goal; never remove a tag without knowing who uses it.
Paths below are relative to this skill's folder (in Claude Code: ${CLAUDE_SKILL_DIR}).
When to use
- "The landing page is slow", "PageSpeed score is 30 on mobile"
- High mobile bounce rate on paid traffic
- Many marketing tags (pixels, heatmaps, chat, A/B tools) on one page
- Before launching ads, or after adding a new tool
When not to use
- Server, hosting, caching and CDN configuration: use a DevOps/hosting skill
- Framework build optimisation (Next.js bundles, code splitting) in depth: framework skill
- Whole-page conversion review:
landing-page-audit
Workflow
- Get field data first, if it exists. Ask for (or have the user run) PageSpeed Insights for the URL on mobile. Field data (CrUX) beats lab data. Targets: LCP under 2.5 s, INP under 200 ms, CLS under 0.1 at the 75th percentile.
- Summarise the assets (read-only).
python3 scripts/asset_summary.py page.html --site-host example.com python3 scripts/asset_summary.py page.html --site-host example.com --json python3 scripts/asset_summary.py page.html --base-dir ./site --fail-on medium--site-hostmarks your own scripts as first-party;--base-diradds local file sizes. Exit 1 = findings at or above--fail-on(defaulthigh). - Fix the LCP element first (details in references/fixes.md):
no
loading="lazy"on the hero image,fetchpriority="high", WebP/AVIF at the displayed size withsrcset, under ~150 KB; no hero slider. - Unblock rendering:
deferfirst-party scripts, remove jQuery if only a slider uses it, combine stylesheets,display=swapfor Google Fonts or self-host fonts withfont-display: swap, preload at most 1-2 fonts. - Tame third parties: make a tag inventory with the owner and purpose of each tag (from the script output). For each: keep, load after consent/interaction, move into the tag manager, or remove. A/B testing anti-flicker snippets with a 4 s timeout hide the page for everyone: cut the timeout to 1 s or less, or test server-side. Load chat widgets on first interaction or after a delay. Ask before removing any tag.
- Stability (CLS): width/height on images, reserved space for embeds and cookie banners, no content injected above the hero.
- Verify: re-run the script, then PageSpeed Insights or
npx lighthouse https://example.com --preset=perf --form-factor=mobile(lab), and watch field data over 28 days. Check conversion rate did not drop when tags moved.
Output
Assets: 14 external scripts (3 blocking in <head>), 11 third-party
ab-testing 1 (blocking + 4 s anti-flicker), heatmap 2 (Hotjar + Clarity), ads 4, chat 1
LCP candidate: /img/hero.jpg - lazy-loaded, JPEG, no fetchpriority
Plan (biggest first)
1. Hero: remove loading="lazy", add fetchpriority="high", serve hero.avif 1200w/800w (est. LCP -1.5 s)
2. Anti-flicker: timeout 4000 -> 800 ms, or run the headline test server-side
3. Defer jquery.js and app.js; drop jQuery once the slider is removed
4. Keep one heatmap tool (Clarity: free, already used by marketing) - confirm with owner
5. Intercom: load on first scroll/click
6. Google Fonts: add &display=swap and preconnect to fonts.gstatic.com
Verify: PageSpeed mobile before 34 / LCP 5.8 s; re-test after deploy.