Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Ad slots shifting your page: how to reserve space and fix CLS

PRF-028Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Cumulative Layout Shift (CLS) is a Google Core Web Vitals score that measures how much visible content jumps around while a page loads. A score of 0.1 or less is rated good. Ad slots are a common cause: the page renders, the ad script runs an auction, and only then does a banner of 250 or 90 pixels appear. If the slot had no height before, all content below it moves down.

Why it costs you leads or sales

When content jumps, visitors lose their place. A form field they were about to tap moves, a headline they were reading disappears, or the button they aimed at is replaced by something else. On a funnel step this means misclicks, abandoned forms and a worse page experience signal for search.

How a late ad breaks a funnel step
  1. Page rendersAd slot has 0 px height
  2. Visitor starts readingMoves to tap the CTA
  3. Ad loadsSlot grows to 250 px and pushes content down
  4. Tap lands wrongVisitor hits the ad or empty space
  5. Form or checkoutNever reached

The ad loads after the page is readable and moves the call to action.

Content jumps as the ad arrives

The button moves down just as the visitor reaches for it.

How to check if your site has it

Find shifting ad slots
  1. Run PageSpeed Insights

    Test your key funnel page on mobile. Open the Cumulative Layout Shift audit and read the list of elements that shifted.

  2. Record a Performance trace

    In Chrome DevTools open Performance, tick Screenshots, reload and look at the Layout Shifts row. Click a shift to see which node moved.

  3. Turn on layout shift regions

    In DevTools open the Rendering panel and tick Layout Shift Regions. Blue flashes show what moved when the ad loaded.

  4. Throttle the network

    Set Network to Fast 4G or Slow 4G so late ads are easier to catch.

  5. Check different ad sizes

    Reload several times. Ads of different heights, or no ad at all, can shift the page differently each time.

How to fix it

The principle is the same everywhere: the container must have its final size before the ad script runs. Pick the size that fills most often, and put the ad inside a wrapper with that size.

Reserve space for a 300x250 slotcss
.ad-slot {
  width: 300px;
  max-width: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

/* Responsive banner that keeps its ratio */
.ad-slot--banner {
  width: 100%;
  aspect-ratio: 728 / 90;
}

/* Mobile banner */
@media (max-width: 727px) {
  .ad-slot--banner {
    aspect-ratio: 320 / 100;
  }
}
Wrapper around a Google Publisher Tag slothtml
<div class="ad-slot" style="min-height:250px">
  <div id="div-gpt-ad-sidebar"></div>
</div>
Reserve space by platform
  1. Find the ad placement

    Check your ad plugin (for example AdSense auto ads, Ad Inserter or your theme's widget area) to see where the slot is inserted.

  2. Add a wrapper class

    Wrap the slot in a div with a class such as ad-slot. Most ad plugins let you add a wrapper or custom CSS class.

  3. Add the CSS

    Go to Appearance > Customize > Additional CSS and paste the min-height rule. Check auto ads separately, as their positions change.

General fix steps
  1. List every ad slot on funnel pages

    Include banners, sticky ads and in-content ads.

  2. Choose the reserved size

    Use the most common size returned for that slot. If sizes vary, reserve for the tallest common one.

  3. Do not collapse the slot on empty

    If no ad fills, keep the space or a neutral placeholder. Collapsing it also moves content, so only collapse slots that sit below the main content.

  4. Move ads away from conversion points

    Avoid placing ads directly above forms, CTAs or the checkout. Below them, a late ad cannot push them.

  5. Avoid inserting above existing content

    Ads injected above content already on screen cause the worst shifts. Place them at fixed positions in the layout.

Ad slot before and after

No reserved space

  • Slot has 0 px height at first render
  • Ad loads and pushes the form down
  • CLS often over 0.1 on the page

Reserved space

  • Slot holds its final height from first render
  • Ad fills the box, nothing moves
  • CLS from the slot close to 0
CLS before and after reserving spaceExample numbers
CLS before and after reserving space (example)Before: 0.3 CLS score; After: 0 CLS score0010.30BeforeAfterCLS score

Example: illustrative scores for one page. Lower is better, and 0.1 or less is good.

How to confirm it's fixed

Confirmation checks
  • Layout Shift Regions show no blue flash around the ad slot on reload
  • PageSpeed Insights lists no ad container under shifted elements
  • Mobile and desktop widths both tested
  • Tested with an ad that fills and with no ad filling
  • Real-user CLS in Search Console's Core Web Vitals report improves (it updates over about 28 days)

How to prevent it happening again

Habits that keep CLS low
  • Require a reserved size for every new ad slot before it goes live
  • Retest the page whenever an ad network, size or placement changes
  • Keep ad slot CSS in one shared class
  • Re-run PageSpeed Insights after theme or plugin updates
  • Schedule automated checks on key funnel pages

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It checks CLS on your funnel steps as the robot visitor runs the journey on a schedule. If the layout shifts too much on a step, you are alerted with a screenshot and a likely cause.

It does not tell you that an ad slot specifically is the cause, and it does not inspect whether each slot has reserved space in your code. It also does not check how ads look to real visitors across every ad size and device.

To cover the rest by hand, use the Layout Shift Regions and Performance trace steps above, check each slot's CSS for a min-height or aspect-ratio, and review the ad network's size settings. FunnelGuard has a Free plan with 1 site and 2 journeys, and paid plans have a 3-day free trial.

Questions people ask

Why do ads cause layout shift?

An ad slot often has no height until the ad loads. When the ad arrives, the slot grows and pushes content below it down, which counts as a layout shift. Reserving the final height in advance prevents it.

How do I reserve space for an ad slot?

Wrap the ad in a container with a min-height, or an aspect-ratio for responsive banners, that matches the most common ad size. For a 300x250 ad, use min-height: 250px. The space then exists before the ad loads.

What is a good CLS score?

Google rates a CLS score of 0.1 or less as good, 0.1 to 0.25 as needs improvement and above 0.25 as poor. The score is measured at the 75th percentile of real visits.

Should I collapse an ad slot when no ad fills?

Only if the slot is below the main content. Collapsing a slot above content that is already visible moves everything under it. Keeping a neutral placeholder avoids that shift.

How do I find which ad is shifting my page?

Open Chrome DevTools, go to the Rendering panel and turn on Layout Shift Regions, then reload. Blue flashes show the moved areas. The Performance panel's Layout Shifts row names the elements that moved.

Can ads on a landing page hurt conversions?

Yes. Late ads can move a form or button as someone goes to tap it, causing misclicks and abandoned forms. They also draw attention away from your call to action. Remove ads from pages built to convert.

Does FunnelGuard detect ad slot layout shift?

Partly. FunnelGuard checks CLS on your funnel steps, but it does not identify ad slots as the cause or check your slot CSS. You need to inspect the slots by hand.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: CLS only.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.