【问题标题】:Can't tell if Prebid CPM Adjustment is working无法判断 Prebid CPM 调整是否有效
【发布时间】:2025-12-08 17:45:01
【问题描述】:

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

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

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

是不是我设置错了?或者有没有更好的方法来验证 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


    【解决方案1】:

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

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

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

    您还可以通过运行以下命令在出价响应中进行验证: pbjs.getBidResponses()

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

    【讨论】:

    • 这很有帮助,谢谢!尽管我不确定您对 netRevenue 的看法,但在我的出价方回复中,这始终设置为 true,无论出价 CPM 调整如何。