CLS A/B testing
CLS (Cumulative Layout Shift) is one of the three Core Web Vitals defined by Google, and it measures the visual stability of a web page: in other words, how elements move unexpectedly during loading.
CLS (Cumulative Layout Shift) is one of the three Core Web Vitals defined by Google, and it measures the visual stability of a web page: in other words, how elements move unexpectedly during loading.
In the context of A/B testing, CLS is a common trap that can skew test results or harm the user experience, even if the tested variation seems better in substance.
🎯 Why it’s critical in A/B testing
An A/B test aims to isolate the impact of a specific change on user behavior (click, conversion…). But if the variation introduces a visual shift (e.g., a button that jumps, an image that pushes content down), then:
- User interaction is disrupted: missed clicks, poor impression, diverted attention,
- The test result becomes biased: the drop in performance doesn’t come from the content being tested, but from the quality of technical execution.
💡 An excessively high CLS won’t be visible in classic KPIs, but it will affect the CVR without anyone understanding why.
đź§Ş How an A/B test can cause CLS
Here are the common scenarios where a variation unintentionally triggers CLS:
- Adding an image or HTML block without reserving space: the content “pushes” the rest of the page once loaded,
- Loading A/B test scripts via a slow tag manager (instead of direct integration in the
<head>), - Dynamically inserting a message or promotional banner above the content without reserved space,
- Changing font or font weight without preload, causing text “jumps”,
- Using uncontrolled CSS animations (e.g., a slide or fade-in effect that redraws the page).
📌 Direct risks in A/B testing:
- Loss of conversions on mobile (where visual jumps are amplified),
- Statistically significant but false results,
- Drop in CVR with no apparent explanation,
- Rejection of the variation for bad reasons.
âś… CRO best practices to avoid impacting CLS:
- Reserve the space for each block added in a variation (e.g.: reserve the height of an image with CSS
aspect-ratioor placeholder classes), - Avoid late content injection with JavaScript (prefer server-side insertions or the earliest possible client-side insertions),
- Test all variations with Lighthouse or PageSpeed Insights before deployment to check the CLS score,
- Integrate A/B test scripts directly into the code (head) to avoid flickering,
- Measure Core Web Vitals live on each variation with a tool like Web Vitals Extension, SpeedCurve, Datadog RUM or BigQuery + GA4.
Related terms
View the full glossary- CDP (Customer Data Platform)A centralized system that collects, unifies and activates customer data from various sources.Data Marketing
- Client-side testing (A/B test)Client-side testing modifies the content visible to the user via scripts executed in the browser.A/B testing
- CLTV (Customer Lifetime Value)This is the total value a customer is expected to bring to a company throughout their entire business relationship.Data
- CMP (Consent Management Platform)A platform that manages user consent for tracking and the use of their personal data.Privacy
- Statistical confidenceLevel of certainty one has in the results of a statistical test.Statistiques
- ConversionDesired action completed by a user on a website, such as a purchase or sign-up.KPI




