減少與廣告相關的版面配置位移
總覽
「累計版面配置位移」指標使用 Layout Instability API 來計算使用者可見的版面配置位移總量,計算方法是找出廣告 iframe 已位移或已造成版面配置位移的所有版面配置位移,並將其版面配置位移分數加總。
建議
這項指標並不代表發生特定問題。而是用來找出有待改善的部分,並追蹤長期的改善情形。
為避免版面配置位移,請務必在廣告代碼載入前設定廣告元素的大小。不過,這個結果可能很難或無法完美,特別是針對接受動態大小廣告的廣告版位,但您可以採用一些最佳做法,在多數情況下盡量減少版面配置位移。詳情請參閱 GPT 開發人員網站上的盡量減少版面配置位移指南。
累計版面配置位移 (CLS)
將累計版面配置位移最佳化
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-06-26 (世界標準時間)。
[null,null,["上次更新時間:2024-06-26 (世界標準時間)。"],[[["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"]]