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
422 stars 717 forks source link

Add hb_env=amp targeting to AMP #3812

Open bretg opened 1 month ago

bretg commented 1 month ago

I'm working on the Ad Ops documentation and it would be both easier and more consistent if PBS added hb_env=amp to the targeting for AMP responses.

This is similar to what's done now setting hb_env=mobile-app for PBSDK requests

muuki88 commented 1 month ago

You can define static key value targetings in a stored request. This is what we do currently

{
  "id" : "xxxxxxxxxxxxxxxxxxx",
  "ext" : {
    "prebid" : {
      "targeting" : { /* ... */ }
      },
      "integration" : "amp",
      "adservertargeting" : [
       // you can add arbitrary targeting here
        {
          "key" : "hb_source",
          "source" : "static",
          "value" : "s2s"
        }
      ]
    }
  },
  "imp" : [ /* ... */  ],
  "source" : { /* ... */  }
}
bretg commented 13 hours ago

I would still like to get approval for PBS to hb_env=amp for the /amp endpoint.

I don't believe this is a breaking change, nor does it need an option like we did for ext.prebid.targeting.includeformat. hb_env=mobile-app is automatically added when app is in the request.