โหลด 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 และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eThis audit checks if header bidding requests are delayed until the Google Publisher Tag library loads, potentially slowing down ad loading.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to make header bidding requests independent of GPT loading to improve performance.\u003c/p\u003e\n"],["\u003cp\u003eYou can make your header bidding requests independent of GPT by ensuring they don't wait for \u003ccode\u003egoogletag.pubadsReady()\u003c/code\u003e or \u003ccode\u003egoogletag.cmd.push()\u003c/code\u003e, as demonstrated in the Prebid.js example.\u003c/p\u003e\n"],["\u003cp\u003eA list of supported ad platforms evaluated by this audit is available on the project's GitHub repository.\u003c/p\u003e\n"]]],["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"],null,["# Load GPT and bids in parallel\n\nOverview\n--------\n\nThis audit checks whether or not header bidding requests are deferred until the\nGoogle Publisher Tag (GPT) library loads. In most cases, these requests are not\ndependent on GPT and can be made in parallel with the library being loaded to\nspeed up ad loading.\n\nRecommendations\n---------------\n\nEnsure that header bidding requests do not wait on `googletag.pubadsReady()` or\n`googletag.cmd.push()`.\n\n### Prebid.js Example\n\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Incorrect** | ```javascript 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 }); }); }); ``` |\n| **Correct** | ```javascript 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(); }); ``` |\n\nMore information\n----------------\n\nThe list of supported ad exchanges and supply side platforms this audit\nevaluates can be found in\n[our GitHub repository](https://github.com/googleads/publisher-ads-lighthouse-plugin/blob/HEAD/lighthouse-plugin-publisher-ads/utils/bidder-patterns.js). \n[View audit source](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/lighthouse-plugin-publisher-ads/audits/gpt-bids-parallel.js) [Improve this article](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/docs/audits/gpt-bids-parallel.md) [Report an issue](https://github.com/googleads/publisher-ads-lighthouse-plugin/issues/new?labels=documentation&template=documentation-feedback.md&title=Documentation+feedback%3A+gpt-bids-parallel.md)\n\n\u003cbr /\u003e"]]