タグはフレームごとに 1 回だけ読み込む
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
概要
この監査では、同じ広告タグライブラリ スクリプトを複数回読み込むフレームがないことを確認します。同じスクリプトを複数回含めることは必要なく、ページ パフォーマンスの低下につながる可能性があります。
推奨事項
重複する広告タグライブラリのスクリプトを削除してください。場合によっては、重複するスクリプトが 2 つの異なる場所から知らずに読み込まれる可能性があります。ネットワーク トラフィックを確認し、フレームごとにリクエストをグループ化して、重複する各スクリプトの送信元を調べます。
スクリプトが重複しているソースを特定する
Chrome DevTools の [Network] タブを使用して、重複するスクリプトを読み込もうとしているフレームを特定します。
Control+Shift+J
または Command+Option+J
(Mac)を押して DevTools を開きます。
- [ネットワーク] タブに移動します。
- まだ表示されていない場合は、[フィルタ
] をクリックしてフィルタバーを開き、[JS] を選択します。
- ネットワーク設定
を開き、[フレームでグループ化] を選択します。
- ページを再読み込みして、ネットワーク トラフィックを取得します。
![Chrome DevTools の [Network] タブのスクリーンショット](https://developers.google.com/publisher-ads-audits/reference/audits/images/duplicate-scripts-devtools.png?hl=ja)
次の広告タグ ライブラリ スクリプトがサポートされています。
ライブラリ |
スクリプト |
AdSense |
pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
pagead2.googlesyndication.com/pagead/js/show_ads.js
|
Google パブリッシャー タグ |
googletagservices.com/tag/js/gpt.js
securepubads.g.doubleclick.net/tag/js/gpt.js
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[],["The audit identifies duplicate ad tag library scripts, which negatively impact page performance. To resolve this, users should remove the redundant scripts. Utilize Chrome DevTools' Network tab, filtering for JS and grouping requests by frame, to find where duplicates originate. Supported libraries include AdSense (with scripts `pagead2.googlesyndication.com/pagead/js/adsbygoogle.js` and `show_ads.js`) and Google Publisher Tag (`googletagservices.com/tag/js/gpt.js` and `securepubads.g.doubleclick.net/tag/js/gpt.js`). The goal is ensuring each script loads only once.\n"]]