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 और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]