0

我已经使用此处列出的官方功能实现了与 admanager 集成的 Prebid 拍卖,并在 30 秒后刷新 adv:

https://docs.prebid.org/dev-docs/examples/adunit-refresh.html

这里使用的代码:

配置

  pbjs.setConfig({
        debug: PREBID_DEBUG,
        enableSendAllBids: true,
        useBidCache: true,
        bidderTimeout: BIDDER_TIMEOUT,
        consentManagement: iabConfig,
    });

刷新代码:

function refreshBid(slot,adUnit){
    console.log("refreshBid auction");
    pbjs.que.push(function() {
        pbjs.requestBids({
            timeout: BIDDER_TIMEOUT,
            adUnitCodes: [slot],
            bidsBackHandler: function() {
                pbjs.setTargetingForGPTAsync([slot]);
                googletag.pubads().refresh([adUnit]);
            }
        });
    });
}

function refreshADV(){
    console.log("refresh adv...");
    var slots=[];
    googletag.cmd.push(function() {
        googletag.pubads().getSlots().forEach(function(e){
            if(e.getAdUnitPath().includes("FloorAd") || e.getAdUnitPath().includes("Sticky")){
                console.log(e.getSlotElementId());
                //Refresh bid...
                refreshBid(e.getSlotElementId(), e); // slot,adUnit
            }
        });
    });
}
setInterval(function(){ refreshADV(); }, 30000);//30ec

刷新仅适用于 2 adv(Floor 和 Sticky),我在屏幕上看到了刷新。

我们在数字上看到了这种差异(仅在那些令人耳目一新的位置上):

  • AdForm:我们在 SSP 中看到 admanager 522 印象 0,31 - 217 印象 0,13 欧元

  • AppNexus:我们在 admanager 上看到 2.876 印象 ed € 0,39 - 231 印象 ed € 0,06 在 SSP

拍卖会在 30 秒后正确重启(我在控制台调试中看到了这一点)。

对我们有什么建议吗?

4

0 回答 0