prebid-server icon indicating copy to clipboard operation
prebid-server copied to clipboard

[Feature Request] Inject Server-Side Floor Values into Prebid.js Bid Object for Analytics

Open tej656 opened this issue 1 year ago • 3 comments

In the current setup of Prebid.js (pbjs) integrated with Prebid Server, the server-side floor data is not propagated to the client side. As a result, analytics adapters on the pbjs side are unable to capture and utilize this floor data effectively.

tej656 avatar Jun 20 '24 18:06 tej656

My proposal here is to have the floors feature create a set of analytics tags that can then be propagated to the client as described in https://github.com/prebid/prebid-server/issues/3615

I'm making the assumption that the important elements needed for client-side analytics are:

  • what floor was sent to a each bidder
  • how that floor was determined (floor source, model, rule, bidadjustments)
  • whether a bid was removed because it was under the floor
[{
   activities: [{
    name: "floor-config",
    status: "success",
    results: [{
        // cross-imp and cross-bidder params
        status: "success",
        values: {
          "source": "fetch",              // request, fetch or noData
          "provider": "providerA", 
          "fetchstatus": "success", // none,success,timeout,error,inprogress
          "model": "12345",
          "skiprate": 10,
          "skipped": false,
          "enforcement": true,
          "dealsenforced": false,
          "enforcerate": 100,
          "floormin": 0.50,
          "floormincur": "USD"
        },
        appliedto: {
          "bidders": "bidderA",
           imp: ["1"]
        }
    }],
  },{
    name: "floor-signaling",
    status: "success",
    results: [{
        // most bidders received $1.00 USD as a floor on imp 1
        status: "success",
        values: {
          "bidfloor": 1.00,
          "adjustedbidfloor": 1.00,
          "bidfloorcur": "USD",
          "rule": "*|*|*",
          "rulevalue": 1.00
        },
        appliedto: {
          "bidders": ["bidderA", "bidderB", "bidderC"]
           imp: ["1"]
        }
     },{
        // bidderD received $1.05 USD as a floor on imp 1 due to bid adjustments
        status: "success",
        values: {
          "bidfloor": 1.00,
          "adjustedbidfloor": 1.05,
          "bidfloorcur": "USD",
          "rule": "*|*|*",
          "rulevalue": 1.00
        },
        appliedto: {
          "bidders": ["bidderD"]
           imp: ["1"]
        }
     },{
        // bidderE received $1.10 USD as a floor on imp 1
        status: "success",
        values: {
          "bidfloor": 1.10,
          "adjustedbidfloor": 1.10,
          "bidfloorcur": "USD",
          "rule": "*|*|bidderE",
          "rulevalue": 1.10
        },
        appliedto: {
          "bidders": ["bidderE"]
           imp: ["1"]
        }
     }]
  },{
    name: "floor-enforcement",
    status: "success",
    results: [{
        // bidderD bid rejected
        status: "success-blocked",
        values: {
          "bidfloor": 1.00,
          "adjustedbidfloor": 1.05,
          "bidfloorcur": "USD",
          "bidprice": 1.00,
          "adjustedbidprice": 0.95
        },
        appliedto: {
          "bidders": ["bidderD"]
           imp: ["1"]
        }
    }]
  }]
}]

@tej656 - please look over this and see if this covers all the data you're looking for in your client-side analytics. I've based it off of what we (Magnite) built for server-side floors analytics, which is serving us well.

bretg avatar Jun 20 '24 20:06 bretg

@bretg This data is nearly complete. We just need to add one more field, 'floorProvider', to identify the floor provider. This field is already supported by client-side analytics today.

tej656 avatar Jun 21 '24 04:06 tej656

Provider added. Will bring this up a future PMC meeting. Heads up that it's likely to be fairly low priority, so we can't promise a timeline. If you have some engineering folks who could contribute, that would be welcome.

bretg avatar Jun 21 '24 14:06 bretg

There's two parts of this:

  1. Update the Floors module to generate the aTag. That's what this issue covers.
  2. Update to support passing aTags back to client-side analytics adapters. That's covered by https://github.com/prebid/prebid-server/issues/3615

bretg avatar Jan 10 '25 15:01 bretg