prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
425 stars 730 forks source link

Support `hb_format` for multiformat AMP requests #1412

Closed hhhjort closed 3 years ago

hhhjort commented 4 years ago

Prebid.js supports hb_format to enable multiformat imps on AMP, see multi-format. The spec itself already exists in the prebid.js documentation, we just need to implement this on PBS.

In line with other flags we have on key value generation, I propose we add an includeformat flag to the targeting extension. So the targeting API would look like:

{
  "ext": {
    "prebid": {
      "targeting": {
        "pricegranularity": {
          "precision": 2,
          "ranges": [{
            "max": 20.00,
            "increment": 0.10 // This is equivalent to the deprecated "pricegranularity": "medium"
          }]
        },
        "includewinners": false, // Optional param defaulting to true
        "includebidderkeys": false // Optional param defaulting to true
        "includeformat": false //Optional param defaulting to false
      }
    }
  }
}

Thus all current requests would not get hb_format added to the key values, but requests that need it can add the flag in order to get access to this value.

SyntaxNode commented 4 years ago

Discussed and accepted by Prebid Server Committee.

bretg commented 4 years ago

Re-opening because this isn't supported in PBS-Java yet.

bretg commented 4 years ago

@hhhjort - question: is it fair to say that includeformat has no effect if neither includewinners nor includebidderkeys is specified?

hhhjort commented 4 years ago

Quick check on the code, as long as prebid.targeting is not empty, it seems that some keys should be generated. Not sure if they could be useful without one of those two being set.

bretg commented 3 years ago

This was available in PBS-Java 1.52

lanceloti commented 5 months ago

I'm using prebidappnexuspsp Vendor, but the hb_format is not present on responses. How could I get this to work without having access to the stored requests? I need the hb_format in the response, so I can target the correct creative in GAM.

bretg commented 5 months ago

@lanceloti - You can send ext.prebid.targeting.includeformat on your request to any Prebid Server to get it to include hb_format. If this is for AMP. then you'll need your Prebid Server host company to create their stored requests with this value.