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.
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.
Example: illustrative scores for one landing page. Your numbers will differ.
How to check if your site has it
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.
Throttle the network
In Chrome DevTools open Network and choose a slower preset such as Fast 4G. Late scripts become easier to see.
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.
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.
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.
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.
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).
Use the theme's own announcement bar
In Online Store > Themes > Customize, add the Announcement bar section. It is rendered in the HTML, so it does not shift.
Review bar apps
If an app injects a bar with JavaScript, ask its support for a reserved-space option or replace it with the theme section.
Find the injecting tag
Look for Custom HTML tags that add a banner to the DOM, often fired on Page View or DOM Ready.
Reserve space
Add a placeholder element with a fixed height to the page template, and have the tag fill that element instead of inserting a new one at the top.
Build the bar in the Designer
Add the bar as a normal element above the navbar so it ships in the page HTML.
Fix its height
Give the bar a set height or min-height in the Style panel for each breakpoint, so wrapping text does not change its size.
Add the bar in the page builder
Place the bar as a section at the top of the page rather than adding it through a custom code script.
Set a fixed height
Set the section height for desktop and mobile so it matches the final size.
Use a strip or header element
Add the bar as a Strip at the top in the editor instead of a third-party app that loads late.
Check the mobile editor
Make sure the strip height on mobile matches what visitors see.
Use the built-in announcement bar
In Website > Pages > Website Tools > Announcement Bar, turn it on. It is rendered with the page.
Avoid code-injected bars
If you added a bar in Code Injection, replace it with the built-in one or reserve its height with CSS.
Render in HTML
Output the bar in the server template so it is in the first response.
Or reserve the space
Use a placeholder container with a fixed height and fill it when the script runs.
#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 */
}
}<div id="promo-bar-slot"></div>
<script>
var slot = document.getElementById('promo-bar-slot');
slot.textContent = 'Free shipping on orders over $50';
</script>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
- 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.
Related issues
- PRF-025CLS over 0.1 on a funnel stepFix guide
- PRF-026Cookie banner pushes content down, CLS 0.3Fix guide
- PRF-032Chat widget launcher pushes footer or CTAFix guide
- PRF-037CLS from content swapped in by personalisation/A-B toolFix guide
- PRF-038CTA moves just as user taps it (mis-click onto other element)Fix guide
- PRF-035Sticky header changes height on scroll causing jumpsFix guide