-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Losing Bid Ad Ids #860
Comments
Actually reviewing the targeting keys, we never send back the bid ID, not even for the winning bid. There are two ways for a creative to pull the correct ad to display. For the default winning bid only setup, the creative can ask prebid.js for the winning bid without knowing the bid ID. If the publisher has set up per bidder line items, then the creative can know which bidder it represents and can query the bids for the wining bid from its bidder. Or you can turn on caching and pull the correct bid (or VAST xml) from cache if the creative cannot access the PBS response at all. (AMP delivery relies on this.) |
Thanks for the reply @hhhjort - so its not the bid_id I am referring too here but the respective SSP 'adid' key. With Prebid clientSide - if you enable sendAllBids - you get back the following keys for each SSP that has bid (below is an example for the openX bidder): hb_format_openx=banner so each bid that was received - has a hb_adid_[SSP-NAME] key returned for it - is it possible to do the same for all SSP bids that are returned on PBS - as I expose all bids to the client from PBS - the only key am missing is the ad_id (am able to return price and bidder name so would assume there would be a way to select a non-winning bid via the client) ? The publishers target line items using various price increments against the 'hb_pb_[SSP NAME]' key they have setup in DFP & then have their DFP creative using/referencing the corresponding adid key: <script> try{ window.top.pbjs.renderAd(document, '%%PATTERN:hb_adid_openx%%'); } catch(e) {/*ignore*/} </script>Aware this is an older creative template but want to know if its possible to achieve the same with PBS / how a bid from a particular SSP can be selected even if its not necessarily the highest/winning one ? |
It would require a code change to enable sending |
Thanks - where/what code would change - can you advise or point me in the right direction and I'll pick up with my engineers ... |
look at |
Oh, one other thing to be aware of if you are using prebid.js ... prebid.js does not request targeting parameters from Prebid Server, it just generates its own set of targeting key-values after reading the bid response from PBS. So if that is your use case, you want to look at the prebid.js code rather than the prebid server code. |
@AskRupert-DM - what's your client platform -- is it Prebid.js or SDK? Prebid.js should be generating the hb_adid targeting value, not PBS. PBS should send back the whole creative body for each bidder, which is then cached, assigned an ID, and ready for pbjs.renderAd. SDK is different - it can be set up to send the whole creative and do app-side caching, in which case it does need an hb_adid, but that could (should?) be provided by the SDK. Or it can be set up with server-side caching in which case hb_cache_id is how the creative is retrieved. |
client - prebid.js @bretg - I can provide you a sample of the response I get back from PBS for a given impression if that helps but in short - only the winning / highest bid has an adID in the body. |
That would be interesting as "hb_adid" does not appear anywhere in the PBS code that I can find. Please include the sample request that generated your sample response. |
Sample request:
Respective Response:
|
so upon further inspection - the adid I am seeing in that sample response is specific to the SSP and not the adID that prebid.js generates for the winning bid and sends in the ad-tags. That would explain @bretg's comment about prebid.js handling this and @hhhjort comment about no reference in PBS to adid existing. So my question is - I'm able to expose all bids on PBS - how / what changes can I make to my adaptor that PB JS uses to generate an adid for each of the bids PBS returns for a single ad unit back to my adapter ? (am generating custom key-value to expose all the bids we get back but have don't know how I can generate an adid for each of those bids that PBJS can use / reference should the publishers ad-server decide they want to run a specific bid - e.g: 2 SSPs return a bid of the same value via PBS - publisher wants prioritises SSP1 over SSP2 but prebid is picking SSP2 as the winning adid - how / what can I expose so they can force/pick SSP1's bid in this scenario) ? |
@AskRupert-DM If I'm understanding you correctly, what you want is to be able to use the bidder specific keys (like If this is this case - what you want to change is not in your Prebid.js adapter code but rather in the Prebid creative code that you have setup in the adserver. The creative code's configuration is what decides which keys to look at and use as part of the rendering process. By default, the creative code is setup to use the generic keys to render the 'winning' bid rather than bidder specific keys. From looking at the test page that was part of the request/response information you pasted (http://ozone.tpdads.com/adapter/1.4.5/test-single.html?pbjs_debug=true), I saw that you are using the Universal Creative code template for GAM/DFP. You can use an alternate form of this code to use the bidder-specific keys. It would look like the following:
You would just need to replace the Can you give this a try to see if it meets your needs? Please let me know if anything is unclear. |
Hi @jsnellbaker - thanks for the reply !
If you look at the DFP calls on my test page you will see my adaptor generates Hope that makes sense / is clear ? |
So when I load your test page and look at the console logs, I see a combination of the Prebid.js targeting keys (the basic ones and the bidder specific ones) as well as the custom keys that you mentioned. I have attached a screenshot of the keys that I see from the console output here: To clarify however this is when Prebid.js is using 2.1.0-pre (as per the prebid.js file you have hosted). When I load the page with the current version of Prebid.js (2.8.0) - the values that the custom keys are assigned are slightly different than what you're currently seeing. I have attached another screenshot of the current Prebid.js output: Initially I would have suggested you could look at the custom keys you already have for the Possible solutionThe adapter file is now defining the custom keys in this area: If you want to create a new targeting key for the In the current version of the adapter, the bid that gets generated has a The To make this work - you would need to populate the I realize there is a lot of information here, so please let me know if you have any questions. |
@AskRupert-DM - I'm not understanding the issue here -- this should already work.
Prebid Server never generates hb_adid. That's the job of Prebid.js. PBS just returns the body of the creative and PBJS generates an ID and the hb_adid value. I've verified this on a test page: http://sneezy.aws.rubiconproject.com/rp-eng-soln/prebid/prebid_server_test_1001.html -- looking at the call going to DFP, I see hb_adid, hb_adid_rubicon, hb_adid_appnexus. Yet, hb_adid did not appear in the PBS response. Are you just trying to display non-winning creatives, or provide feedback to SSPs about bad creatives? The former case is covered. The latter may not be. If you continue to feel there's an issue, you're going to need to post a test page and clearly describe what you believe is missing. Thanks. |
@bretg @jsnellbaker - have provided an example and details below which hopefully clarify the issue / what it is I am trying to do a bit more clearly: Testpage: http://ozone.tpdads.com/adapter/1.4.5/test-single.html You will see the following key-values get returned (for both slots but am just listing the first 300x250 slot here):
There's the standard However, you will see there is only a So my question is - how could I get prebid.js to expose a |
Dug around a bit. You guys have built an alternate version of the prebidServerBidAdapter... a call to your ozone client adapter results in a call to your hosted Prebid Server that carries a stored request ID, which results in a series of bids from various sources. So I think this is an architectural problem. Prebid.js doesn't expect bids for more than one bidder to come from a 'normal' adapter. I don't know that it's currently possible for a normal adapter to set targeting keys for other bidders. In fact, I kinda hope it's not possible, as it could be abused. I believe the prebidServerBidAdapter has special core-level functionality to do this -- it's considered a trusted multi-bidder adapter. Will let @jsnellbaker and @mkendall07 comment on whether there is a technical workaround, but I'd like to step back and ask a bigger question... would you be willing to rearchitect your solution to use an enhanced prebidServerBidAdapter? If there's some custom logic in your JS, we could add a hook to support. As for stored-request-ids from PBJS, that's something I've been wanting to do anyhow, so would be happy to implement that part of the feature. Should be as simple as defining a place in the AdUnit to put the storedRequestId and updating pbsBidAdapter to pass it through the openRTB. PS - Note that your test page should either remove rubicon and appnexus, or build your prebid_ozone_prod.js file to include the appnexus and openx bidAdapters. There are errors like "ERROR: Trying to make a request for bidder that does not exist: appnexus". |
Hey @bretg apologies for the delayed response - I've been looking into a solution for my issue of the back of @jsnellbaker earlier feedback which actually was very useful - much appreciated @jsnellbaker ! I believe I've managed to find a fix/solution which appears to work... I've setup the following test page that used a version of my adapter which pointed to spoof'd bid-response endpoint which could include the http://ozone.tpdads.com/pbs/20190402/prebid_20190402_test.php - this is the desired behaviour where I am getting DFP to priorise/pick the openX bid regardless of whether its the winning bid (aware these have the rubi/appnexus errors - I removed those adapters on purpose to avoid their targeting keys causing confusion and also aware that the code needs to be cleaned up but in short this should illustrate/explain the solution) What I've done to achieve this (outside of the suggestion @jsnellbaker made around including a
Reading Documentation on interpretResponse : http://prebid.org/dev-docs/bidder-adaptor.html (see 'interpreting the response') - it says you can return none, one or more bids - so in short I've modified the adaptor to return all bids (i.e. one or more) - so think what I'm doing is within scope and not malicious or bad practise (I hope!). RE: your question @bretg about 'rearchitecting our solution to use an enhanced prebid server adapter' If a enhanced adapter was to exist in the future we would be more than happy to look at it and potentially migrate to it in the future - however, do want to flag that we're quite a way down the line with the use of our own adaptor and have spent a large amount of time working with publishers to deploy it in addition to making a number of changes on our end to PBS (eg: logging request and incoming attributes as well as the way we handle sending targeting onto each of SSPs) so migrating to a different adapter isn't as straightforward as what's been suggested (although top line the steps entailed will not be far of your suggestion). Keep us posted/updated with timeframe's you may have in mind for when this could be available and we'll happily review it ... I've seen some tickets/issues open on both the prebid.js side around some of the stuff we spoken about (standardising targeting and supporting stored requests) and had some feedback which I'll try add to those tickets as soon as possible. It would be great in the interim to get the feedback on the proposed solution around losing bid adIds which I'd like to include in our next adapter update. |
@AskRupert-DM - I have reservations about this approach:
I will leave the merge decision to @mkendall07, but even if he allows it, I would require a warning on your prebid.org page (http://prebid.org/dev-docs/bidders.html#ozone) explaining to publishers that they must not run certain client-side bid adapters when they're using ozone or risk bid conflict.
We couldn't do this because we don't know what missing features drove you to build your own system. If you list all the features you would need in PrebidServerBidAdapter and PrebidServer, we'll consider them, though I'm certain it would be done faster if your team drove the effort with our support. |
Thanks for the feedback - will review and once we get @mkendall07's feedback. Want to clarify a couple of things based on your comments as possibly it may not be clear how we are operating: (1) the bids we return and expose are ALL server side bid/bidders that we run on our instance of PBS - no different to what PBS bid adaptor does - however, we've exposed additional information from the bid-response in order to provide better transparency and insights to publishers via their ad-server log files... the prebidserver bid adapter exposes all bidder bids back to the client - we aren't doing anything different here in that regard... (2) All the bids we return are grouped under the 'ozone' bidder-code and the custom key-values we write are differentiated from other bidders & that prebid.js sets by default to avoid any confusion. (3) I understand the concern you raise around whether publishers will understand which bidders are involved, however we represent a small group of large publishers in the UK on an invite-only basis and are not a traditional SSP in that regard where this would probably be a bigger issue/concern. |
Do you mean you're not utilizing hb_pb_bidder, but rather something like oz_pb_bidder? As long as you're not overwriting the standard hb_* targeting variables, I'm less concerned. I still think you should be considering a migration to a more standard architecture because your server-side bidders may want features like cookieSync, syncUrlModifier, First Party Data, and MediaTypePriceGranularity. |
Correct - not overwriting any standard hb_* variables/values. |
I'm not really sure what I've been asked to weigh in on really. AFAIK there isn't a pull request here, or is this to ask if a pull request of the type above would be accepted? As Bret mentioned, I'm less concerned about a bidder setting custom keys. That seems fairly harmless and I think a few PBJS bidders do it today. |
Read through this again. I don't approve of the solution of adding a non-OpenRTB attribute to the Prebid Server. First, because But I also question why PBS would need to assign ad IDs at all. Your Prebid.js adapter can generate them. PBS should not be generating anything except for cache IDs, and those only for the scenarios (e.g. VAST XML) where it's necessary. The model is that the browser stores the creatives in the javascript, assigns the adid, which is then used as the retrieval key for display. |
Thanks for the feedback all - @bretg - have reviewed your feedback and have been able to find a method to generate the IDs via the adaptor. What I was unaware of at the time of opening this issue was how the adId's got created/generated in the first place and I had assumed PBS was doing that when really PBJS / PB Core handles this. As a quick test/PoC - I've updated my The original This sets unique adId targeting to the Dom elements, and allow DFP to render the correct bid / adId. Differences to the previous solution discussed:
Does this solution seem acceptable ? |
Sounds fine to me. All contained within your PBJS adapter, right? |
Yes all within the PBJS adapter (apologies do realise this thread/issue was now better placed in that forum rather than PBS). |
Hi
I had a question regarding prebid server bid responses for all bids. Right now it seems as though only an adID for the winning bid is returned in the end bid response.
I'm able to respond back with all bids & am able to send back all the common key-values in terms of the bidders name and their price bids - but don't have the respective ad IDs for the non-winning/losing bids.
Some publishers are setup in a way where they let the ad-server DFP do decisioning on which bid to pick based on the hb_pb_ssp key-value and therefore require the adid for the respective bid in order to correctly render it - however, it looks like by design PBS is only providing an ad ID for the winning bid and none of the other bids that were made ?
Any ideas on how what changes need to be made in PBS to potentially allow for publishers to pick/select one of the non-winning bids adIDs to render/run ?
Cheers,
Rupesh
The text was updated successfully, but these errors were encountered: