简体   繁体   English

使用Prebid的价格粒度高

[英]Using Prebid's price granularity high

We have our Price Granularity for Prebid set to high. 我们将竞价的价格粒度设置为高。 However, since it's capped at $20, if we get a bid for $30 or $40 we're unable to accept it. 但是,由于它的上限是20美元,因此如果我们出价30美元或40美元,我们将无法接受。

How can we stick with Price Granularity high with Prebid, but in instances we have a bid north of $20, automatically round down to $20 so that we can accept the bid. 我们如何在Prebid中将价格粒度保持在较高水平,但是在某些情况下,我们的出价在20美元以北,因此会自动舍入为20美元,以便我们接受出价。

Thank you.. 谢谢..

According to Prebid documentation is should already be rounded down, but you can explicitly control it by adding the following code. 根据Prebid文档,应该已经对它进行了四舍五入,但是您可以通过添加以下代码来显式地控制它。

Assuming you're using the standard Prebid targeting keys 假设您使用的是标准的Prebid定位键

pbjs.bidderSettings.standard = {
        adserverTargeting: [{
                key: 'hb_bidder',
                val: function val(bidResponse) {
                        return bidResponse.bidderCode;
                }
        }, {
                key: 'hb_adid',
                val: function val(bidResponse) {
                        return bidResponse.adId;
                }
        }, {
                key: 'hb_pb',
                val: function val(bidResponse) {
                        var cpm = bidResponse.cpm;
                        if (cpm > 20.00) {
                                return 20.00;
                        }
                        return (Math.floor(cpm * 100) / 100).toFixed(2);
                }
        }]
};

Add this after pbjs.addAdUnits( ad_units ) 将其添加到pbjs.addAdUnits(ad_units)之后

You'll want to use the custom setting instead of using high to get what you want 您将要使用自定义设置,而不是使用high来获取所需的内容

See an example here: http://prebid.org/dev-docs/publisher-api-reference.html#customCPMObject 在此处查看示例: http : //prebid.org/dev-docs/publisher-api-reference.html#customCPMObject

For the JSON youll want to redefine the same granularity settings for high in that JSON object and then add upon it to get additional granularity > $20. 对于JSON,您需要为该JSON对象中的high重新定义相同的粒度设置,然后对其进行添加以获取大于20美元的其他粒度。

Pro tips: 专业提示:

  • if you do not define values between $0-$x.xx that can act as a floor if you never want bids lower than x going to DFP 如果您未定义介于$ 0- $ x.xx之间的值,并且在您不希望出价低于x的情况下可以用作下限,
  • DFP caps the number of line items in an order at 450, so you may need an additional order(s) for your new granularity DFP广告管理系统将订单中的订单项上限设置为450,因此您可能需要其他订单才能获得新的粒度
    • always overlap the settings. 总是重叠设置。 Eg. 例如。 Bucket 1 = $0-$3.00. 值区1 = $ 0- $ 3.00。 Bucket 2 should start at $3.00-x (if you dont, a $3.009 bid wont be passed in to DFP 时段2的起始价格应为$ 3.00-x(如果您不愿意,则$ 3.009的出价将不会传递到DFP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM