Skip to content

PBS Bid Adapter oRTB caching and video updates #3528

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

Merged

Conversation

idettman
Copy link
Contributor

@idettman idettman commented Feb 6, 2019

Type of change

  • Other

Description of change

Changes to the prebidServerBidAdapter were needed to support S2S video:

When trying to do S2S video, we need the ability to:

  • Set request.ext.prebid.cache.vastxml to cache XML
  • request.ext.prebid.targeting.includewinners: true
  • request.ext.prebid.targeting.includebidderkeys: false
    Without these, the openrtb won't work for video.

Several changes are needed to the prebidServerBidAdapter:

  • s2sConfig extPrebid support: merge into request.ext.prebid

  • making response.ext.prebid.cache values available to prebidjs core, renderers, and analytics adapters

  • append adserverTargeting to response bidObj if defined, the buildDfpVideoUrl function in dpfAdServerVideo will add it's properties as additional targeting, including hb_cache_host, hb_cache_path, hb_cache_path_rubicon, hb_cache_host_rubicon

Other information

Per cache requirements

Isaac Dettman added 2 commits February 7, 2019 14:27
@idettman
Copy link
Contributor Author

idettman commented Feb 8, 2019

Latest changes from ticket have been applied and ready for review

@idettman idettman added the needs 2nd review Core module updates require two approvals from the core team label Feb 19, 2019
Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@idettman thanks for adding this feature!
Just had a few questions. Thanks!
Cc: @harpere

prebid: {
targeting: {
// includewinners is always true for openrtb
includewinners: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pardon my ignorance here, but are either of these flags a breaking change?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think so,

I believe they just instruct PBS what to do with the ext.prebid.targeting.adServerTargeting response object.

includewinners: true ==> hb_{} keys are passed back

includebidderkeys: true ==> hb_{}_{bidder} keys are passed back

We set the latter to false to keep the number of KVPs down.
@bretg Can confirm maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, that makes sense.


// If ext.prebid.targeting exists, add it as a property value named 'adserverTargeting'
if (extPrebidTargeting && typeof extPrebidTargeting === 'object') {
bidObject.adserverTargeting = extPrebidTargeting;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the use case for PBS setting the keys into Prebid.js? AFAIK this is only for mobile use case where the client doesn't process the bids => keys.

Copy link
Collaborator

@bretg bretg Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are additional KVPs that need to be copied through to the ad server, all utilized by the Prebid Universal Creative:

  • hb_cache_host
  • hb_cache_path
  • hb_winurl (not there yet, but will be)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see thanks for clarifying. I wonder if PBJS should be setting these then? Because there could be a case where PBS isn't involved but universal creative is being used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized after commenting while the above is true, you most likely won't need either _host or _path unless you are using AMP or prebid mobile, both of which are powered by PBS. So this most likely safe.

@mkendall07 mkendall07 requested a review from hhhjort February 20, 2019 20:52
@mkendall07
Copy link
Member

Added @hhhjort for a quick review as well.

@idettman
Copy link
Contributor Author

idettman commented Mar 4, 2019

@hhhjort Can you review sometime today as we're trying to get into the release tomorrow.

Copy link
Contributor

@hhhjort hhhjort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@idettman idettman removed the needs 2nd review Core module updates require two approvals from the core team label Mar 5, 2019
Copy link
Collaborator

@robertrmartinez robertrmartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@idettman idettman added on hold and removed on hold labels Mar 5, 2019
@idettman
Copy link
Contributor Author

idettman commented Mar 5, 2019

We did some extra testing and found an issue. When buildVideoUrl calls getAllTargeting and there are two bid response objects, it was constructing the adServerTargeting object to change the hb_uuid and hb_cache_id to be arrays containing both bidders uuids. We traced it to getAllWinningBids and we implemented a fix in auction.js. Basically we are adding those two keys as standardTargeting values when mediaType === video.

We implemented a fix in src/constants.js and src/auction.js, but we're waiting for re-review before merging.

@idettman idettman removed the on hold label Mar 5, 2019
@jsnellbaker
Copy link
Collaborator

I did some additional testing based on the above comment and the fix that was implemented appears to be working; the bids are properly generating the values for the hb_cache_id and hb_uuid keys.

@idettman idettman merged commit 9d5b9b4 into prebid:master Mar 5, 2019
@jsnellbaker jsnellbaker mentioned this pull request Mar 6, 2019
1 task
@idettman idettman deleted the HB-3018_pbs-adapter-enhancements branch March 18, 2019 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants