Home / Blog / Does your consent banner hurt your Core Web Vitals?

Does your consent banner hurt your Core Web Vitals?

Often, yes. A consent banner is JavaScript that runs before almost everything else on the page, and heavy banners add real milliseconds to Largest Contentful Paint and real jitter to Interaction to Next Paint. The cost comes from blocking scripts, late styling, and layout shifts, and each has a specific fix.

Where the cost comes from

Consent scripts load early because they have to: nothing else is allowed to fire until the consent state is known. That priority is exactly what makes them expensive. A banner script that blocks rendering while it decides whether to show anything delays the entire page. Banner stylesheets loaded late can shift layout when the banner finally renders, which shows up in Cumulative Layout Shift. And post-choice scripts, the tags that fire after the visitor clicks, can flood the main thread just as the user starts interacting, which is when Interaction to Next Paint is measured.

Measure the banner separately

Run a performance comparison with and without the consent script, in a lab tool like Lighthouse or in field data segmented by consent state. Most publishers are surprised by the gap: it is common to see a banner contribute 200 to 500 milliseconds to LCP on mobile, and INP damage is harder to spot because it only shows in the interaction data after the choice. Measure both the pre-choice cost and the post-choice tag flood, because they hit different metrics and need different fixes.

Fixes that actually move the scores

First, load the consent script asynchronously where the platform allows it, and keep the critical consent state tiny so the decision is fast. Second, reserve space for the banner so it never shifts layout when it appears: a fixed-position banner with defined dimensions costs zero CLS. Third, defer the post-consent tags instead of firing them all at once, staggering analytics, ads, and heatmaps so the main thread can breathe between them. Fourth, cache the consent state aggressively so returning visitors skip the decision work entirely.

Do not trade compliance for speed

The tempting shortcut is to let tags fire early and ask later, which is fast and illegal in the EU. Every performance fix has to preserve the consent order: no non-essential tag before the choice. A banner that is fast because it skipped consent is not a performance win, it is a compliance failure with good Lighthouse scores. The publishers who win on both fronts are the ones who measure the banner like any other render-blocking script and optimize it the same way.

Get a free consent audit of your website

Free consent audit