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(); }); |
فهرست مبادلات تبلیغاتی پشتیبانی شده و پلتفرم های جانبی عرضه که این ممیزی ارزیابی می کند را می توان در مخزن GitHub ما یافت.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-12 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-12 بهوقت ساعت هماهنگ جهانی."],[[["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"]]