โหลด GPT และราคาเสนอพร้อมกัน
ภาพรวม
การตรวจสอบนี้จะดูว่าคําขอการเสนอราคาส่วนหัวมีการเลื่อนเวลาจนกว่า
การโหลดไลบรารีแท็กผู้เผยแพร่โฆษณาผ่าน Google (GPT) ในกรณีส่วนใหญ่ คำขอเหล่านี้จะไม่
แบบต้องอาศัย GPT และสามารถสร้างควบคู่ไปกับการโหลดไลบรารีเพื่อ
เพิ่มความเร็วในการโหลดโฆษณา
คำแนะนำ
ตรวจสอบว่าคำขอการเสนอราคาส่วนหัวไม่ได้รออยู่ใน googletag.pubadsReady()
หรือ googletag.cmd.push()
ตัวอย่างของ Prebid.js
ไม่ถูกต้อง |
window.pbjs = pbjs || {}; pbjs.que = pbjs.que || [];
window.googletag = window.googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); // Incorrect: Making bid requests dependent on GPT loading. pbjs.que.push(function() { pbjs.requestBids({ bidsBackHandler: handleBidResponse }); }); });
|
ถูกต้อง |
window.pbjs = pbjs || {}; pbjs.que = pbjs.que || []; // Correct: Making bid requests independent of GPT loading. pbjs.que.push(function() { pbjs.requestBids({ bidsBackHandler: handleBidResponse }); });
window.googletag = window.googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); });
|
ดูรายชื่อ Ad Exchange และแพลตฟอร์มฝั่งซัพพลายที่รองรับซึ่งการตรวจสอบนี้ประเมินได้ในที่เก็บ GitHub ของเรา
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-10-16 UTC
[null,null,["อัปเดตล่าสุด 2024-10-16 UTC"],[[["This audit checks if header bidding requests are delayed until the Google Publisher Tag library loads, potentially slowing down ad loading."],["It's recommended to make header bidding requests independent of GPT loading to improve performance."],["You can make your header bidding requests independent of GPT by ensuring they don't wait for `googletag.pubadsReady()` or `googletag.cmd.push()`, as demonstrated in the Prebid.js example."],["A list of supported ad platforms evaluated by this audit is available on the project's GitHub repository."]]],["The audit checks if header bidding requests are unnecessarily delayed by waiting for the Google Publisher Tag (GPT) library to load. Header bidding requests should be independent of GPT to speed up ad loading. Avoid using `googletag.pubadsReady()` or `googletag.cmd.push()` to trigger bid requests. The correct approach, exemplified with Prebid.js, is to initiate `pbjs.requestBids` outside of the `googletag.cmd.push()` function, making the bid requests run in parallel to GPT loading.\n"]]