On this page
What this issue is
Cumulative Layout Shift (CLS) is a score for how much visible content moves while a page loads. An embed is a block of content served by another site, such as a YouTube video, an Instagram post or a reviews widget. If the page does not know the embed's size in advance, it shows nothing or a tiny box. When the embed finishes loading, it expands and pushes everything below it down.
- Page paintsEmbed area is 0 px or a small placeholder
- Visitor starts readingForm and button sit just below the embed
- Embed loadsWidget grows to 400 px or more
- Content jumpsForm and CTA are pushed down
- Tap or click missesVisitor hits the wrong element or gives up
The page renders without knowing the embed's height, then the embed expands and moves the form below it.
Why it costs you leads or sales
When content jumps, people lose their place. A visitor about to tap a button may tap something else, or the button moves out of view. On mobile, where embeds are tall relative to the screen, the effect is larger. A poor CLS score can also count against you in Google's page experience signals, though it is one factor among many.
Example: a landing page where the reviews widget alone pushes the page over the 0.1 limit. Your numbers will differ.
How to check if your site has it
Run PageSpeed Insights
Test the page on mobile at pagespeed.web.dev. Open the Diagnostics list and look for 'Avoid large layout shifts'. It names the elements that moved.
Record it in Chrome DevTools
Open DevTools, go to Performance, tick Screenshots, record a page load and look for red 'Layout Shift' markers. Click one to see which node moved.
Turn on Layout Shift Regions
In DevTools, open the three-dot menu, then More tools, then Rendering, and tick 'Layout Shift Regions'. Reload and watch for blue flashes around the embed and the content below it.
Throttle the network
Set the Network tab to 'Fast 4G' or 'Slow 4G' and reload. Slow loading makes late embed resizing easy to see.
Inspect the embed container
Right-click the embed, choose Inspect, and check whether the wrapper has a width, height or aspect-ratio before load. If it has none, that is your cause.
How to fix it
The principle is the same everywhere: tell the browser how much space the embed needs before it loads. Videos have a known shape (usually 16:9), so use aspect-ratio. Widgets such as reviews have no fixed shape, so use a min-height close to their typical loaded height.
<div style="aspect-ratio: 16 / 9; width: 100%; max-width: 640px;">
<iframe
src="https://www.youtube.com/embed/VIDEO_ID"
width="640" height="360"
style="width: 100%; height: 100%; border: 0;"
loading="lazy"
title="Video title"
allowfullscreen></iframe>
</div>.reviews-widget {
min-height: 420px; /* set to the widget's typical loaded height */
}
@media (max-width: 600px) {
.reviews-widget {
min-height: 640px; /* widgets are often taller on mobile */
}
}Use the native video block
Embed videos with the core YouTube block, which wraps them in a responsive 16:9 container. Avoid pasting raw iframes with fixed heights into the Classic block.
Wrap widget shortcodes
Put the reviews shortcode in a Group block, give it a CSS class under Advanced, then add a min-height rule for that class in Appearance, Customize, Additional CSS.
Edit the section's Liquid or CSS
In Online Store, Themes, Edit code, find the section that holds the embed and wrap it in a div with an aspect-ratio or min-height rule. Many reviews apps also have a placeholder-height setting in their own app settings; check yours.
Prefer the theme's video section
Where the theme offers a video section, use it instead of a custom HTML block, since it usually sets the ratio for you.
Check for injected widgets
If a Custom HTML tag injects a widget, make sure the target element already exists in the page with a min-height, instead of the tag creating a new element above existing content.
Use the Video element
Add the Video element rather than a raw Embed, as it keeps a 16:9 ratio.
Set a min-height on the widget wrapper
Select the div around the Embed element, open the Style panel, Size, and set Min H to the widget's loaded height. Set a larger value on the mobile breakpoint.
Set the element height
In the funnel or website builder, select the Custom Code or Video element and set a fixed height in its size settings, for each device view you use.
Size the embed in the editor
Wix HTML iframes and video players sit in fixed-size boxes. Set the box to the height the content needs, and check the mobile editor separately, since mobile layouts are set on their own.
Use a Video block
Use the Video block rather than a Code block for YouTube. For widgets in a Code block, add a wrapper div with a min-height using Custom CSS under Design.
Add aspect-ratio or min-height
Wrap every iframe and widget mount point in a container with a defined size, as in the snippets above. Set width and height attributes on iframes too.
Use a facade for heavy embeds
Show a thumbnail image at the correct ratio and load the real player only on click. The space is fixed from the start.
Before
- Embed has no size until it loads
- Form and button jump down when it appears
- CLS above 0.1 on mobile
After
- Container holds the space from first paint
- Content below stays in place
- CLS back under 0.1
How to confirm it's fixed
- Reload with Layout Shift Regions on and see no blue flash around the embed area
- Record a Performance trace and see no layout shift entries tied to the embed
- Re-run PageSpeed Insights on mobile and check CLS is 0.1 or lower
- Test on a real phone over mobile data, not only on desktop
- Check with the embed's content both short and long, such as a short and a long review
How to prevent it happening again
- Give every new embed a sized container before it goes live
- Place late-loading widgets below forms and main CTAs
- Retest CLS after changing a reviews app, theme or video provider
- Use lazy loading only for embeds below the first screen, and still reserve their space
- Keep a list of third-party widgets on key pages so you know what to check
How FunnelGuard handles this
FunnelGuard detects this issue only partly. It checks CLS only: when its robot visitor runs your journey, it can show that layout shift is high on a step. It does not tell you which embed caused the shift, and it does not check how each individual widget is sized.
To cover the rest by hand, use the steps above: run PageSpeed Insights, record a DevTools trace with Layout Shift Regions on, and inspect the container of each embed on your key pages. Do this after you add or change any embed. FunnelGuard's Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.
Questions people ask
Why does my YouTube embed make the page jump?
The iframe has no reserved space, so the page lays out content below it first. When the player loads, it takes its full height and pushes everything down. Wrap it in a container with aspect-ratio: 16 / 9 and the jump goes away.
How do I stop an Instagram embed causing layout shift?
Wrap the embed in a container with a min-height close to its typical loaded height. Instagram embeds vary with caption length, so also place them below your form and main button, where any small shift cannot move them.
Why is my reviews widget causing a high CLS score?
Reviews widgets usually load by JavaScript after the page, then insert content of unknown height. Set a min-height on the widget's wrapper matching its loaded size, on both desktop and mobile, so the space is held in advance.
What is a good CLS score?
Google treats a CLS of 0.1 or lower as good. Scores above 0.25 are considered poor. Check your score in PageSpeed Insights or Chrome DevTools.
Does lazy loading an iframe fix layout shift?
No. Lazy loading delays the request but does not reserve space. You still need width and height attributes, an aspect-ratio or a min-height so the area is held before the embed loads.
How do I find which embed is causing layout shift?
Open Chrome DevTools, go to Rendering and tick Layout Shift Regions, then reload the page. The area that flashes blue is shifting. The Performance panel's Layout Shift entries also name the moved element.
Can FunnelGuard tell me which embed is shifting my page?
No. FunnelGuard checks CLS only, so it can show that a step has high layout shift but not which embed caused it. Use DevTools or PageSpeed Insights to find the specific element.
Related issues
- PRF-025CLS over 0.1 on a funnel stepFix guide
- PRF-031Images without dimensions shift text below themFix guide
- PRF-032Chat widget launcher pushes footer or CTAFix guide
- PRF-034Late-loading price or stock widget shifts Add to cart buttonFix guide
- PRF-036Lazy-loaded section above the viewport shifts scroll positionFix guide
- PRF-038CTA moves just as user taps it (mis-click onto other element)Fix guide