-
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
PBS videoCacheKey and vastUrl #2101
PBS videoCacheKey and vastUrl #2101
Conversation
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.
LGTM, but should probably have appenxus video implementor review as well
I'm not convinced we fully understand this problem. There's a broader issue where setting s2sConfig.cacheMarkup=1 destroys display ads. Yet it's required for video which is on the same page. Going to assign it to back to @moonshells who will report on our internal discussions. |
is this ready for review? |
…dy cached video bids only
@mkendall07 Yes, please review it. |
modules/prebidServerBidAdapter.js
Outdated
bidObject.videoCacheKey = bidObj.cache_id; | ||
} | ||
if (bidObj.cache_url) { | ||
bidObject.vastUrl = bidObj.cache_url; |
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.
I don't think this does anything by itself? ie, prebid.js will still try to cache this URL, so essentially your double caching here I believe. You'd need a way to signal to the core prebid library not to cache this bid.
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.
upon further review: it does check:
https://github.com/prebid/Prebid.js/blob/master/src/auction.js#L230
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.
Do note that the current version of AMP support does not include cache_url
, it only sends the cache_id
.
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.
if that is the case, we need to update this to check both keys exist. Otherwise we'll break caching if cache_url
doesn't exist.
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.
check for both cache_id and cache_url and only update the bid if both exist.
@mkendall07 Thanks for pointing this out! Bug fixed. |
* 'master' of https://github.com/prebid/Prebid.js: EngageBDR New Bid Adapter (prebid#2309) [FEAT] adunit sizes support (prebid#2320) Support aliases in prebidServer (prebid#2257) Changing default currency file to https (prebid#2306) Update stalebot labels (prebid#2319) Enhance location detection within utils (prebid#2167) if cache markup is not enabled, set it to the default value 0 (prebid#2302) Serverbid Bid Adapter: Added archon alias (prebid#2293) Smart Ad Server: Fix bug when multi bids (prebid#2170) NEW adapter AdtelligentBidAdapter (prebid#2137) add optional param to bridgewellBidAdapter (prebid#2289) Increment Pre Version Prebid 1.6.0 Release Unit test fixes (prebid#2301) PBS videoCacheKey and vastUrl (prebid#2101) Add Oneplanetonly Bid Adapter (prebid#2269) firing new adRenderFailed event when renderAd() fails (prebid#2210) Add Content Ignite adapter (prebid#2268) add hb_cache_id, hb_uuid should be deprecated and replaced by hb_cache_id (prebid#2273) Update Yieldlab adapter and add official maintainer (prebid#2231) Update for Media.net adapter (prebid#2232) Update to Rubicon Adapter for mediaTypes support (prebid#2272) message formatting (prebid#2285) Yieldbot impression image creation fix (prebid#2277) Updated Bid params (prebid#2275) Audience Network: Add 'pbv' and 'cb' query params (prebid#2252) Add e-planning analytics adapter (prebid#2211) Add vastUrl for Gamma Adapter Video (prebid#2261) update params for test bid (prebid#2267) Updated adUnitCode (prebid#2262)
* assign video cache key with cache id then DFP knows the correct hb uuid * add unit test for cache id and video cache key * reformat code * point vastUrl to cache_url as required by method isValidVideoBid in video.js * assign videoCacheKey with cacche_id, vastUrl with cache_url for already cached video bids only * update the bid only if both cache_id and cache_url are available
Type of change
Description of change
When video bids are cached by Prebid Server (Rubicon Video is using server side cache), there's no need to cache them in Prebid.js, they should have correct videoCacheKey and vastUrl.