ลดการเปลี่ยนแปลงเลย์เอาต์ที่เกี่ยวข้องกับโฆษณา
ภาพรวม
Cumulative Layout Shift วัดจำนวนการเปลี่ยนแปลงของเลย์เอาต์ทั้งหมดที่ผู้ใช้เห็น โดยใช้ Layout Instability API ด้วยการสรุปคะแนนการเปลี่ยนแปลงของเลย์เอาต์ของการเปลี่ยนแปลงทั้งหมดที่ iframe ของโฆษณามีการเปลี่ยนแปลงหรือทำให้เลย์เอาต์เกิดการเปลี่ยนแปลง
การแนะนำวิดีโอ
เมตริกนี้ไม่ได้แสดงถึงปัญหาใดโดยเฉพาะ ควรใช้เมตริกเพื่อช่วยระบุส่วนที่ควรปรับปรุงและติดตามการปรับปรุงเมื่อเวลาผ่านไป
คุณต้องกำหนดขนาดขององค์ประกอบโฆษณาก่อนที่แท็กโฆษณาจะโหลดเพื่อหลีกเลี่ยงไม่ให้เลย์เอาต์เปลี่ยนแปลง ซึ่งอาจทำได้ยากหรือทำอย่างถูกต้องไม่ได้เลย โดยเฉพาะอย่างยิ่งสำหรับช่องโฆษณาที่ยอมรับโฆษณาที่มีขนาดแบบไดนามิก แต่มีแนวทางปฏิบัติแนะนำที่คุณสามารถทำตามเพื่อลดการเปลี่ยนแปลงของเลย์เอาต์ในกรณีส่วนใหญ่ได้ ดูข้อมูลเพิ่มเติมได้จากคําแนะนําในการลดการเปลี่ยนแปลงของเลย์เอาต์ที่เว็บไซต์นักพัฒนาซอฟต์แวร์ GPT
Cumulative Layout Shift (CLS)
เพิ่มประสิทธิภาพ Cumulative Layout Shift
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-06-26 UTC
[null,null,["อัปเดตล่าสุด 2024-06-26 UTC"],[[["Cumulative Layout Shift (CLS) quantifies the total visual instability caused by ad iframes shifting or inducing layout changes, using the Layout Instability API and layout shift scores."],["This metric helps pinpoint areas for improvement and track progress rather than diagnosing specific issues."],["Minimizing layout shift is crucial and involves pre-setting ad element sizes, though achieving perfection is challenging, especially with dynamic ads."],["Refer to the GPT developer guide for best practices in minimizing layout shift for most scenarios."]]],["Cumulative Layout Shift (CLS) measures user-visible layout shifts, specifically those caused by or involving ad iframes. It uses the Layout Instability API and sums the layout shift score. Recommendations include setting sizes for ad elements before loading to minimize shifts. While perfect prevention is difficult, especially for dynamically sized ads, best practices are suggested. This metric helps track improvements, not pinpoint issues. Resources are available for further optimization and guidance.\n"]]