Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Promo bar pushing page down after load: how to fix the shift

PRF-027Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Cumulative Layout Shift (CLS) measures how much visible content moves around while a page loads. Google treats a score of 0.1 or less as good.

A promo bar causes it when a script, app or tag manager adds it after the first render. The page first paints with the header at the top. A moment later the bar appears above it and everything below moves down by the bar's height. Typical examples are free shipping notices, sale countdowns and cookie-free announcements added by an app or a Google Tag Manager tag.

A bar appears and the page jumps

The page renders, then the bar is injected and pushes the content down.

Why it costs you leads or sales

When content jumps, people lose their place. A visitor who is about to tap a button may hit a different element, or the headline they were reading moves out from under their eyes. On mobile the shift is most noticeable because the bar takes a bigger share of the screen.

CLS is also one of Google's Core Web Vitals, so repeated shifts can weigh on your page experience signals. The effect on a single page is usually moderate, which is why the impact here is medium. It grows when the bar sits on every landing page and checkout step.

CLS with and without a late promo barExample numbers
CLS with and without a late promo bar (example)Bar injected after load: 0.2 CLS score; Space reserved: 0 CLS score0010.20Bar injected after lo…Space reservedCLS score

Example: illustrative scores for one landing page. Your numbers will differ.

How to check if your site has it

Find a late-injected bar
  1. Watch the page load

    Open the page in a private window and reload it. Look for a bar that pops in above the header after the page first appears.

  2. Throttle the network

    In Chrome DevTools open Network and choose a slower preset such as Fast 4G. Late scripts become easier to see.

  3. Record layout shifts

    In DevTools open Performance, tick Screenshots, reload and record. Look at the Layout Shifts row in the Experience track, then click a shift to see which element moved.

  4. Run PageSpeed Insights

    Test the URL and open the diagnostics for Avoid large layout shifts. The bar or the header below it is often listed.

  5. Test mobile and desktop

    The bar may wrap to two lines on mobile, so the shift is larger there.

How to fix it

There are two good options. Best is to put the bar in the page HTML so it is there from the first paint. If it has to load late, reserve a space with a fixed height so the bar fills it without moving anything.

Fix by platform
  1. Use a server-rendered bar

    Check whether your theme or bar plugin has a setting to show the bar in the page markup rather than via JavaScript. Many themes have a top bar option in Appearance > Customize.

  2. Reserve the height

    If the plugin injects the bar late, add a min-height to its container in Appearance > Customize > Additional CSS (see the CSS snippet below).

Reserve space for the barcss
#promo-bar-slot {
  min-height: 44px; /* match the real bar height on desktop */
}
@media (max-width: 600px) {
  #promo-bar-slot {
    min-height: 64px; /* bar often wraps to two lines on mobile */
  }
}
Placeholder in the page, filled laterhtml
<div id="promo-bar-slot"></div>
<script>
  var slot = document.getElementById('promo-bar-slot');
  slot.textContent = 'Free shipping on orders over $50';
</script>
Late bar vs reserved space

Before

  • Bar is injected by a script after first paint
  • Header and hero move down
  • Buttons can move under the visitor's finger

After

  • Bar is in the HTML or has reserved height
  • Content stays where it first appeared
  • CLS from the bar is close to zero

How to confirm it's fixed

Confirm the fix
  • Reload with the network throttled and see no jump when the bar appears
  • The Layout Shifts row in DevTools Performance shows no shift at the top of the page
  • PageSpeed Insights no longer lists the bar or header in layout shift culprits
  • Mobile and desktop both look stable, including when the bar text wraps
  • The page still looks right with the bar dismissed or hidden

How to prevent it happening again

Bars are often added by marketers through an app or tag manager and nobody checks the effect on layout. Make it a rule that any new top bar must ship with a reserved height. Review each new campaign banner on mobile before it goes live, and re-test CLS whenever a seasonal bar is added or removed.

How FunnelGuard handles this

FunnelGuard detects this only partly. It checks CLS only: when it runs your journey it measures layout shift on the steps, so a bar that pushes content down shows up as a higher CLS score.

It does not tell you that a promo bar is the cause, and it does not check whether space is reserved for the bar. You need to cover that by hand: use the DevTools Performance steps above to see which element moved, and check the bar on mobile and desktop whenever you add or change a campaign.

There is a Free plan (1 site, 2 journeys, daily checks, no card), and paid plans have a 3-day free trial. A free read-only website audit is also available.

Questions people ask

Why does my announcement bar push the page down after loading?

The bar is probably added by JavaScript after the page first paints. The browser has not reserved space for it, so everything below moves down when it appears. Render the bar in the HTML or reserve its height.

Does an announcement bar affect Core Web Vitals?

Yes, if it appears after the first render and moves content. That movement counts toward Cumulative Layout Shift, where 0.1 or less is considered good. A bar present in the initial HTML does not cause a shift.

How do I stop a top banner causing layout shift?

Give the banner's container a fixed height or min-height from the first paint, matching the bar's real size on each screen width. Or output the bar in the server-rendered HTML. Test on mobile, where text may wrap.

How do I find which element causes CLS on my page?

Open Chrome DevTools, go to Performance, record a page reload and look at the Layout Shifts row. Click a shift to see the elements that moved. PageSpeed Insights also lists layout shift culprits.

Should I reserve space if visitors can close the bar?

Reserve space only if the bar shows by default. If a visitor has dismissed it, the server or an early head script should hide it before paint. Removing it after load would cause a shift of its own.

Is a sticky or fixed-position bar a layout shift problem?

A bar with position fixed that overlays the page does not push content, so it usually does not add layout shift. A bar that sits in the normal flow and appears late does. Overlays can still cover buttons, so check that too.

Can FunnelGuard tell me if my promo bar causes layout shift?

Partly. FunnelGuard measures CLS on your funnel steps, so a high score will show. It does not identify the promo bar as the cause, so use DevTools to confirm.

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.