تحميل علامة "ناشر Google" (GPT) وعروض الأسعار بشكل موازٍ

نظرة عامة

تتحقّق عملية التدقيق هذه مما إذا كان سيتم تأجيل طلبات عروض الأسعار في عنوان الصفحة إلى أن يتم تحميل مكتبة علامة "ناشر Google" (GPT) أم لا. وفي معظم الحالات، لا تعتمد هذه الطلبات على علامة "ناشر Google" ويمكن إجراؤها بالتوازي مع المكتبة التي يتم تحميلها لزيادة سرعة تحميل الإعلانات.

الاقتراحات

تأكَّد من أنّ طلبات عروض الأسعار في عنوان الصفحة لا تنتظر في 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.