prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.32k stars 2.08k forks source link

Publishers should be able to filter the bids entering the auction #12399

Open pm-harshad-mane opened 3 days ago

pm-harshad-mane commented 3 days ago

Feature request

After receiving the bids from bidders , there should be a way for publishers to enforce a filtering logic on given bids to decide which bids should be used in auction per slot, discarded bids can be optionally sent to cache.

Use cases:

How?

If not supported already, we can introduce new event that is triggered right before running the auction logic on the received bids

pm-harshad-mane commented 3 days ago

@patmmccann @dgirardi what do you think? We can discuss this on next PBJS PMC meeting

dgirardi commented 1 day ago

Is it already supported somehow?

Right now publishers can choose which bid wins, if they're prepared to write code. It's trivial when using renderAd (you just pass it a bid of your choosing); with GPT I believe targeting needs to be set manually (which we could improve). It's probably easier to adjust CPMs for a similar effect.

This is not the same as rejecting bids - but all rejecting does is generate an analytics event; it doesn't notify bidders. Rejected bids are also not kept in cache; that seems a contradiction.

patmmccann commented 1 day ago

possible dupe of https://github.com/prebid/Prebid.js/issues/6453

Would https://github.com/prebid/Prebid.js/issues/6453#issuecomment-804268606 solve your concerns?

patmmccann commented 1 day ago

perhaps this could be an extension of the recently released #12147

pbjs.requestBids({
    bidsBackHandler: (bids) => {
        // loop through ad units
        Object.entries(bids).forEach(([adUnit, bids]) => {
            // invalidate blocked ads
            bids.forEach(bid => {
                if (inRejectScope(bid.meta.adomain[0])) {
                    pbjs.markWinningBidAsUsed({ adId: bid.adId });
                }
            })
        });
        // continue normal logic
    },
});
pm-harshad-mane commented 1 day ago

@dgirardi I would like the filtered bids to be pushed in the cache and be used in the next auction. @patmmccann the solution mentioned above is first good step, we need to improve :

dgirardi commented 17 hours ago

If filtered bids are to be kept in cache, is "mark bid as filtered" different from "bid didn't win yet"? It looks the same as loss notifications to me, with the same problem, namely that any bid could still win in the future. Also, if it was filtered from an auction, why would it not be filtered again from the next auction?

I think we can separate out the targeting problem (it should be easier to pick any particular bid as winner when using GPT); but I don't understand the goal for analytics. If publishers need to write custom logic to pick this new type of losing bid, does it help them to notify themselves through their analytics?

pm-harshad-mane commented 13 hours ago

@dgirardi yeah we can consider, "mark bid as filtered" NOT different from "bid didn't win yet".

Why a filtered bid may win later?

Finding the highest bid for an adslot after custom filtering of bids by publisher should be done by Prebid logic. Pub should not decide which is winning bid. Targeting key-value generation should also be done by Prebid post filtering.

Analytics use case: Yes, notifying themselves will be useful to know the impact of the implementation at scale.