-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
RAS Bid Adapter: fledge support #10477
Conversation
d0484de
to
0e4637e
Compare
@@ -129,6 +129,36 @@ const getGdprParams = (bidderRequest) => { | |||
return queryString; | |||
}; | |||
|
|||
const parseAuctionConfigs = (serverResponse, bidRequest) => { | |||
if (isEmpty(serverResponse) || isEmpty(bidRequest)) { | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not append fledge if it is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the first iteration of implementation we were planning to return the configs in the serverResponse so if it was empty we would return null, but as you pointed out now there is no reason to do that. I'll correct the code.
@patmmccann |
The problem is that we are loading gpt asynchronously and it's not always available when required by prebid and changing this logic to load gpt first and then prebid would make the code run slower, as now it runs in parallel. |
Additionally, it would enable running FLEGDE component auctions in any ad server - not just Google Ad Manager. But in that case maybe this module shouldn't be called "fledgeForGpt" but just "fledge" or even better "protectedAudienceApi" ;) |
@wsusrasp GPT isn't available by the time the bids are back? Can you open your request as a new issue? @skoklowski linking #9481 to your comment. Could you elaborate on how that would enable not using GAM, perhaps in the issue above? Are you envisioning the configs are submitted to a different top level auction runner, eg Microsoft, or that Prebid or the pub runs the top level? Aside: I'll be in Germany next week if you want to meet up |
Targeting works on "complete" bids, so the control you refer to allows you (as the publisher) to pick winners. Fledge is different, only GPT has access to the auction result. The only control the publisher has is who to include in the auction, which is already possible with various combination of My understanding is that to do the equivalent of
I'm not sure I understand - wouldn't this be a problem regardless of fledge, if your slots are not waiting for Prebid? |
Returning raw config would make it possible to call runAdAuction from navigator, without the need for GPT |
Our slots are waiting for prebid, but we set their config via getAdserverTargeting and they are defined after we make a call for bids. That's why if possible we'd like to be able to set the component configs manually on the slot. Would that be possible? Perhaps something like pbjs.fledge.getComponentConfigs(auctionId)? If needed, I can provide a draft in a separate PR. |
Do you mean that the GPT slots are created only after running Prebid? Otherwise I think the existing flow should work. If it doesn't I'd like to understand why - since this is not the only place where Prebid looks up slots in GPT. My understanding is that as long as the slot exists, the fledge setConfig should work even if done before your other configuration. |
It is exactly as you said, the GPT slots are defined after running Prebid. I do not have the precise reason, although since we are loading GPT in parallel it would still lead to race condition. The simple fix is to force the GPT to load before prebid (in series) but that would increase the time for the ads to load. |
@dgirardi: Both Prebid.js and GPT scripts are asynchronous. We load them in parallel to speed up time when ads are displayed. Thanks to this approach it's more likely that user won't leave the page until ads are displayed. In addition Active View metric should be better. I will try to describe this process. Let's assume that we need for example 2 seconds for loading GPT script and only 1 second to load Prebid.js script. Additionally we set for example 0.8 seconds as a timeout for Prebid standard auctions (in fact this is timeout for bidders to respond). Our current approach Your approach Solution
|
Type of change
Bugfix
Feature
New bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Add support for the fledge.
Other information