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

PBS videoCacheKey and vastUrl #2101

Merged
merged 7 commits into from
Mar 20, 2018

Conversation

moonshells
Copy link
Contributor

@moonshells moonshells commented Feb 2, 2018

Type of change

  • Bugfix

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.

Copy link
Collaborator

@snapwich snapwich left a 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

@bretg
Copy link
Collaborator

bretg commented Feb 2, 2018

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.

@mkendall07 mkendall07 added this to the Prebid 1.4.0 milestone Feb 12, 2018
@mkendall07 mkendall07 self-requested a review February 20, 2018 19:17
@moonshells moonshells changed the title Pbs video cache key PBS video cache key Feb 21, 2018
@moonshells moonshells changed the title PBS video cache key PBS videoCacheKey and vastUrl Feb 21, 2018
@mkendall07 mkendall07 modified the milestones: Prebid 1.4.0, Prebid 1.5.0 Feb 23, 2018
@mkendall07 mkendall07 modified the milestones: Prebid 1.5.0, 1.6 Mar 8, 2018
@mkendall07
Copy link
Member

is this ready for review?

@moonshells
Copy link
Contributor Author

@mkendall07 Yes, please review it.

bidObject.videoCacheKey = bidObj.cache_id;
}
if (bidObj.cache_url) {
bidObject.vastUrl = bidObj.cache_url;
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

Copy link
Member

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.

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.

check for both cache_id and cache_url and only update the bid if both exist.

@moonshells
Copy link
Contributor Author

@mkendall07 Thanks for pointing this out! Bug fixed.

@mkendall07 mkendall07 merged commit 4fbf447 into prebid:master Mar 20, 2018
@moonshells moonshells deleted the pbs_video_cache_key branch March 20, 2018 19:06
mifefr added a commit to mifefr/Prebid.js that referenced this pull request Mar 29, 2018
* '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)
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants