Skip to content
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

Add 'hb_cache_host' and 'hb_cache_path' targeting for video bids when cache is set #3652

Merged

Conversation

idettman
Copy link
Contributor

Type of change

  • Other

Description of change

When setConfig.cache.url is defined, pass hb_cache_host to ad server. We need hb_cache_host set to trigger the new Prebid video cache redirector, and we may as well send hb_cache_path as well. Both host and path are parsed from the prebid config cache property: config.getConfig('cache.url').

Use case:

  1. The new Prebid Video Cache Redirector is live and the ad server URL points to it
  2. video adunit calls for AppNexus and Rubicon video
  3. AppNexus returns VAST and caches it client-side
  4. On client side caching, hb_cache_host isn't sent to ad server

The general idea is straight-forward: when cache.url is specified, parse it and add hb_cache_host and hb_cache_path to the targeting variables.

config.setConfig({
  cache: {
    url: 'https://prebid.adnxs.com/pbc/v1/cache'
  }
});

@idettman idettman added needs review needs 2nd review Core module updates require two approvals from the core team labels Mar 18, 2019
});

// Adding hb_cache_host + hb_cache_path
Copy link
Collaborator

Choose a reason for hiding this comment

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

So if mediaType is video,

And cache.url is defined,

Every bidResponse object will now contain hb_cache_host and hb_cache_path in the adServerTargeting.

Sounds good to me.

And if an adapter had also previously specified these two values in its bidResponseObject, then we take it as is instead of overriding with the client side cache.url.

This satisfies the scenario where some bidders use a server side cache and others use client side.

LGTM.

@@ -505,6 +506,19 @@ function setupBidTargeting(bidObject, bidderRequest) {
}

export function getStandardBidderSettings(mediaType) {
// factory for key value objs
function createKeyVal(key, value) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice idea!

@idettman idettman added needs 2nd review Core module updates require two approvals from the core team and removed needs review needs 2nd review Core module updates require two approvals from the core team labels Mar 18, 2019
@mkendall07
Copy link
Member

can anyone explain or link to what the Prebid Video Cache Redirector is ? Thanks

@bretg bretg removed the request for review from harpere March 18, 2019 21:46
@bretg
Copy link
Collaborator

bretg commented Mar 18, 2019

can anyone explain or link to what the Prebid Video Cache Redirector is ? Thanks

https://github.com/prebid/prebid-video-cache-redirector/blob/master/motivation.md

@idettman
Copy link
Contributor Author

idettman commented Mar 19, 2019

@mkendall07

Prebid Cache Redirector Service

Git repo: https://github.com/prebid/prebid-video-cache-redirector
Motivation doc: https://github.com/prebid/prebid-video-cache-redirector/blob/master/motivation.md

DFP imposes a limit on publishers entering in a video VAST tag URL... the host cannot be a variable.
Given that macros are possible, it seems like a good solution would be to supply the host and path on the ad request, but this is impossible in DFP, as %% macros cannot be supplied in the host name.

The solution we chose is for Prebid.org to host a cache redirector service. The video creative would point to this service, which then redirects the player to where the cached asset actually resides.
The publisher would be able to enter a constant VAST tag URL like:

https://cache.prebid.org/redir?uuid=%%PATTERN:hb_uuid%%&host=%%PATTERN:hb_cache_host%%

cache.prebid.org is the new service -- it looks at the hb_cache_host variable and redirects the video player to the appropriate place, e.g. prebid.adnxs.com/pbc/v1/cache or prebid-server.rubiconproject.com/cache.

To support the use case of separate line items for each bidder, the VAST tag URL could contain the bidder-specific key-value-pairs:

https://cache.prebid.org/redir?uuid=%%PATTERN:hb_uuid_rubicon%%&host=%%PATTERN:hb_cache_host_rubicon%%

@idettman idettman merged commit 63c1d36 into prebid:master Mar 19, 2019
idettman pushed a commit that referenced this pull request Mar 19, 2019
idettman pushed a commit that referenced this pull request Mar 19, 2019
pycnvr pushed a commit to conversant/Prebid.js that referenced this pull request Apr 4, 2019
pycnvr pushed a commit to conversant/Prebid.js that referenced this pull request Apr 4, 2019
jacekburys-quantcast pushed a commit to jacekburys-quantcast/Prebid.js that referenced this pull request May 15, 2019
jacekburys-quantcast pushed a commit to jacekburys-quantcast/Prebid.js that referenced this pull request May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants