22.07.2022
Cumulative Layout Shift (CLS) is one of the core web vitals metrics. CLS is a metric that measures the shifting of the position of elements, that is their visual stability, as a website continues to download. Elements that may cause order shift; videos, images, forms, buttons, and different types of content.
Cumulative Layout Shift can be for many reasons:
Apart from these, the fact that the site speed is too low and the width and height values are not entered on the HTML adversely affects the visual stability, which leads to an increase in CLS.
One of the tools we can use to measure the CLS metric is Google PageSpeed Insights. Apart from that, another tool we can use is the Google Chrome Lighthouse extension. Can we understand the existence of CLS without using tools? Yes, we can notice the shifts in large elements when we first start loading our site , to be able to notice more clearly, it is enough to start loading the site at low internet speed.
To eliminate the CLS issue, we first need to maintain visual stability on our site. If we talk about visuals as an example, if you do not specify the width and height values on the HTML, the element before the image will be loaded until the page loads. Once the image is loaded, the image will take its place, and the element that comes in its place will slide down. So, if we determine the width height values of the images on HTML, will it not cause problems in terms of responsiveness? everyone started thinking. A correct idea, if we determine only through HTML, visuals on mobile will create problems. Therefore, we need to use the following css for img tags;
img
{
width: 100%;
height: auto;
}
You can watch the video below for detailed information.
You can use the font-display feature of CSS and codes such as auto, optional, swap to lower the CLS value and repair these problems.
font-display: auto;
0.0 – 0.1 | 0.1 – 0.25 | 0.25++ |
Successful | Open to Development & Acceptabl | Failed |
SEO has been many years since we came out of a position where ranking was achieved only with the right content planning and keyword optimization. Now, Google Keyword puts the pages with good targeting and user experience in the first place. The CLS metric entered our lives with the core update such as core web vitals to measure the user experience. If your site loads fast and has high visual stability, the user who enters our site has more session time and this is reflected in our Bounce Rate rates.
Perfist Blog
Similar Articles
With the transition from Universal Analytics to Google Analytics 4, there may be some issues you need to resolve. One of these issues is “unassigned” traffic. Dimensions appearing as “unassigned” / (not set) in reports negatively impact your ability to analyze and optimize. We will discuss the causes of “unassigned” traffic in your GA4 reports […]
Read More
Beginner Level Web/App AnalyticsEarlier this year, Google Cloud announced that BigQuery data warehouse supports automatic data transfer from Facebook Ads. In its preview stage, this feature offers an alternative way to enhance analysis and insights by allowing the scheduling of data loading tasks. With this integration, the need for third-party tools or manual code execution is eliminated. This […]
Read More
Mid Level Web/App AnalyticsBy combining the app and web data in Google Analytics 4, app analysis has become more easily trackable. Firebase Analytics allows you to easily track your iOS or Android app with GA4. With numerous different tools available for mobile app tracking, being able to see both web and app data within the same property is […]
Read More
Mid Level Web/App AnalyticsBusinesses want to use as much data as possible from analytics and marketing cookies. However, in order to collect and use this data, they need to comply with laws such as KVKK/GDPR. By enabling Cookie Mode, Google helps to use cookies according to the level of consent. In other words, with Cookie Mode, users’ privacy […]
Read More
Mid Level Web/App Analytics