Tải song song GPT và giá thầu
Tổng quan
Quá trình này kiểm tra xem yêu cầu đặt giá thầu dựa vào tiêu đề có bị trì hoãn cho đến khi thư viện Thẻ nhà xuất bản của Google (GPT) tải hay không. Trong hầu hết các trường hợp, những yêu cầu này không phụ thuộc vào GPT và có thể thực hiện song song với quá trình tải thư viện để đẩy nhanh tốc độ tải quảng cáo.
Đề xuất
Đảm bảo rằng yêu cầu đặt giá thầu dựa vào tiêu đề không đợi từ ngày googletag.pubadsReady()
hoặc
googletag.cmd.push()
.
Ví dụ về Prebid.js
Không chính xác |
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 }); }); });
|
Đúng |
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(); });
|
Danh sách các nền tảng trao đổi quảng cáo và bên cung được hỗ trợ trong quá trình kiểm tra này
có thể tìm thấy các kết quả đánh giá trong
kho lưu trữ GitHub của chúng tôi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-10-16 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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"]]