首页 > 解决方案 > 无法判断 Prebid CPM 调整是否有效

问题描述

我正在尝试使用每千次展示费用调整在我的标头出价合作伙伴之间创建一个公平的竞争环境,其中一些提供净出价,一些提供总出价。

我已经按照 Prebid 网站上的文档进行了设置,但我认为它不起作用。

当我使用pbjs_debug=trueURL 参数并查看控制台时,我没有看到任何迹象表明正在调整出价。

我是不是设置错了?还是有更好的方法来验证 CPM 是否得到调整?

<script>
  var PREBID_TIMEOUT = 1500;

  var adUnits = [{
    code: 'div-gpt-ad-1487305430432-0',
    mediaTypes: {
      banner: {
        sizes: [[300, 250]],
      },
    },
    bids: [
      {
        /* **snip** */
      }],
  }];

  var pbjs = pbjs || {};
  pbjs.que = pbjs.que || [];

</script>
<!-- Prebid Config Section END -->

<!-- Prebid Boilerplate Section START. No Need to Edit. -->

<script type="text/javascript" src="/js/prebid.1.20.0.js" async></script>


<script>
  var googletag = googletag || {};
  googletag.cmd = googletag.cmd || [];
  googletag.cmd.push(function() {
    googletag.pubads().disableInitialLoad();
  });

  pbjs.bidderSettings = [
    {
      districtm: {
        bidCpmAdjustment: function(bidCpm) {
          return bidCpm * 0.85;
        },
      },
    }];

  pbjs.que.push(function() {
    pbjs.addAdUnits(adUnits);
    //  pbjs.setPriceGranularity('low');
    const customConfigObject = {
      'buckets': [{
        'precision': 2,  //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12
        'min': 0,
        'max': 14,
        'increment': 0.01,
      }],
    };

    //set custom config objec
    pbjs.setConfig({ priceGranularity: customConfigObject });

    pbjs.requestBids({
      bidsBackHandler: sendAdserverRequest,
    });

  });

  function sendAdserverRequest() {
    if (pbjs.adserverRequestSent) {
      return;
    }
    pbjs.adserverRequestSent = true;
    googletag.cmd.push(function() {
      pbjs.que.push(function() {
        pbjs.setTargetingForGPTAsync();
        googletag.pubads().refresh();
      });
    });
  }

  setTimeout(function() {
    sendAdserverRequest();
  }, PREBID_TIMEOUT);

</script>

标签: prebid.js

解决方案


在控制台上运行以下代码:

pbjs.bidderSettings.{{bidder_code}}.bidCpmAdjustment(100)

在您的情况下,bidder_code 可以是“区”。这将返回 85,即 85%。

您还可以通过运行来验证出价响应: pbjs.getBidResponses()

如果该特定投标人的 bidcpmadjustment 不是 100%,您可以在此处看到 netRevenue 为假。


推荐阅读