広告関連のレイアウト シフトを減らす
概要
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"]]