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

outstream VAST caching should depend on the renderer rather than the adunit #11353

Open
bretg opened this issue Apr 17, 2024 · 0 comments
Open

Comments

@bretg
Copy link
Collaborator

bretg commented Apr 17, 2024

Type of issue

enhancement

Description

Suggested improvement in how publishers decide whether to cache outstream VAST.

In #8833 a new useCacheKey flag was added to the AdUnit to force outstream bids to utilize the video cache.

We view this as a sub-optimal solution since the decision about whether outstream needs to be cached for a URL depends on the renderer, not the adunit. Some bidder renderers may support rending on the VAST in the bid, while other renderers may require a URL to that VAST. Posting VAST to a cache endpoint is a pretty expensive operation that shouldn't be done if a renderer doesn't require it.

So I'd like to suggest we add a renderer-based flag and perhaps someday remove the adunit-based flag.

There are 4 places a renderer can be defined:

  1. by the bidder
  2. on the adunit
  3. on the adunit.video mediatype
  4. on the adunit.bid

The renderer doc defines a renderer object as having these fields:

  • url – Points to a file containing the renderer script.
  • render – A function that tells Prebid.js how to invoke the renderer script.
  • backupOnly – Optional field, if set to true, buyer or adapter renderer will be preferred

To these, the proposal is to add requiresVastUrl as a boolean. When true, PBJS-core will POST the VAST to the cache.url when no vastUrl exists. This whole topic is has gotten complicated, so here's a summary of the scenarios.

PBJS should POST to cache.url to save the VAST when:

  1. Context=instream requires a UUID that's eventually passed to the ad server as hb_uuid and later appended to a URL where the ad server/video player can obtain the VAST
    1. If a bid response only has VAST XML and no URL, always POST each VAST response to cache.url and set the bidresponse.videoCacheKey
    2. If the cache.ignoreBidderCacheKey option is true, always POST each VAST response to cache.url and set the bidresponse.videoCacheKey
  2. Context=outstream requires a VAST URL when the renderer needs it.
    1. legacy: if the adunit.useCacheKey is true, POST each VAST response to cache.url and set bidresponse.vastUrl
    2. if the active renderer.requiresVastUrl is true and this bidResponse doesn't already contain vastUrl, POST the VAST response to cache.url and set bidresponse.vastUrl

A potential drawback is that PBJS-core may not know at bidresponse time which renderer will be utilized for a given adunit. It might currently only know this at render time. So this would require moving up the decision of which of the 4 possible renderers to utilize.

If this is approved by the community, we would probably want to enhance the PBS meta fields. Currently is supports seatbid.bid.ext.prebid.meta.rendererUrl -- we might want to support seatbid.bid.ext.prebid.meta.rendererRequiresVastUrl as well. Or we could assume that Prebid Server will be set up to cache and return a URL in that scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Req
Development

No branches or pull requests

1 participant