Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Keep Adagio bidder params's compatibility

Open takenorim opened this issue 10 months ago • 9 comments

I found an external document below mentioned about Adagio's bidder params since PBJS v9. This page can be found from the page directly linked at the Prebid.org document (ref).

  • https://adagioio.notion.site/Adagio-Account-Setup-Guide-fbcd940649224cdfa10393d2f008792e?p=ba7270714f274a48a01428a0231ba13f&pm=s
var adUnits = [{
	// ...code: 'ban-atf',
	// ...mediaTypes: {...},
  // ...sizes: {...},

  // Dedicated Adagio bidder params
  bids: [{
    bidder: "adagio",
    params: {
	    organizationId: "1000",                // Required
      site: "my-site",                       // Required
    },
  }],
  // Params shared between all bidders
  ortb2Imp: {
    ext: {
      data: {
        divId: "div-gpt-ad-1460505748561-0", // Required
        placement: "my-adg-placement",       // Required
      }
    }
  },
}];

pbjs.setConfig({
  // Params shared for the current page
  ortb2: {
   site: {
     ext: {
       data: {
         pagetype: "article",                // Recommended
         category: "economy",                // Optional    
       }
     }
   }
 },
});

Though the following latest codes actually read value from Adagio's params.placement and set it as the ortb2Imp.ext.data.placement, this raises an warning message said Relying on adUnits[].bids.adagio.params is deprecated. This message may imply that this deepSetValue will be removed in near future.

  • https://github.com/prebid/Prebid.js/blob/master/modules/adagioRtdProvider.js#L380-L394
      // ortb2Imp level
      let mustWarnOrtb2Imp = false;
      if (!deepAccess(ortb2Imp, 'ext.data.placement')) {
        if (adagioBid.params.placement) {
          deepSetValue(ortb2Imp, 'ext.data.placement', adagioBid.params.placement);
          mustWarnOrtb2Imp = true;
        }
      }


      if (mustWarnOrtb2) {
        logWarn('`pagetype` and `category` must be defined in the FPD `ortb2.site.ext.data` object. Relying on `adUnits[].bids.adagio.params` is deprecated.');
      }
      if (mustWarnOrtb2Imp) {
        logWarn('`placement` must be defined in the FPD `adUnits[].ortb2Imp.ext.data` object. Relying on `adUnits[].bids.adagio.params` is deprecated.');
      }

I believe many of publishers need backward compatibility, so please consider to keep providing this fallback logic to use the params.(placement|id) as default value in case of the ortb2Imp.ext.data.(placement|id) is missing.

Also, it's worthwhile to share the ortb2Imp.ext.data.divId among all bidders, because it's very generic info. However, I do not think it's a best practice to set a specific bidder's params as the ORTB2 object ortb2Imp.ext.data.placement.

takenorim avatar Mar 07 '25 04:03 takenorim

I believe many of publishers need backward compatibility, so please consider to keep providing this fallback logic to use the params.(placement|id) as default value in case of the ortb2Imp.ext.data.(placement|id) is missing.

Why do we need backwards compatability? Adagio seems to prefer this transition and they haven't announced a deadline. ortb2.site.ext.data would only need to be set once and could be priviliged to any bidder you choose. It wouldn't need to be repeated on each ad unit. It is helpful for parameters to be specified once instead of in some special way for each bidder, so generally implementors appreciate the direction of the warning is feedback I've received.

Tagging in @osazos to expand on their thinking and plans for the future

patmmccann avatar Mar 10 '25 16:03 patmmccann

@patmmccann - Thank you very much for your comments.

It wouldn't need to be repeated on each ad unit.

It looks my example makes you confused. Key point here is that Adagio bidder will need /adUnit[].ortb2Imp.ext.data.(divId|placement). So, it would needs to be repeated on each ad unit. The following is example what I'm thinking to configure the adUnits array for Adagio.

var adUnits = [{
  "code": 'div-gpt-ad-1111111111111-0',
  "mediaTypes": {...},
  "sizes" : {...},
  bids: [{
    bidder: "adagio",
    params: {
	  organizationId: "1000",
      site: "my-site",
    },
  },{
    bidder: "bidder-1",
    params: {...}
  },{
    bidder: "bidder-2",
    params: {...}
  }],
  // Params shared between all bidders
  ortb2Imp: {
    ext: {
      data: {
        divId: "div-gpt-ad-1111111111111-0",
        placement: "my-adg-placement-AAAA"
      }
    }
  }
}, {
  "code": 'div-gpt-ad-2222222222222-0',
  "mediaTypes": {...},
  "sizes" : {...},
  bids: [{
    bidder: "adagio",
    params: {
	  organizationId: "1000",
      site: "my-site",
    },
  },{
    bidder: "bidder-1",
    params: {...}
  },{
    bidder: "bidder-2",
    params: {...}
  }],
  // Params shared between all bidders
  ortb2Imp: {
    ext: {
      data: {
        divId: "div-gpt-ad-2222222222222-0",
        placement: "my-adg-placement-BBBB"
      }
    }
  }
}, {
  ...(snip)...
}];

takenorim avatar Mar 11 '25 06:03 takenorim

Hi @takenorim

Thank you for bringing this up! This is definitely a point that deserves attention. I’ve taken note of it and will get back to you soon with more information.

osazos avatar Mar 11 '25 09:03 osazos

To add some color here - from what I have seen this ortb2Imp.ext.data.placement field is ADAGIO specific, meaning that it does not mean anything to any other bidders. Yet, when "required" to be sent in this field, all other bidders will ingest it.

The other one ortb2Imp.ext.data.divId actually means something to all bidders as it looks to be the actual divId of the ad.

The thought we had was that if there is something specific to a bidder on a per adUnit basis then that is what bidder params were made for.

This would be like putting Rubicon ZoneId in ortb2imp or Appnexus placementId etc etc.

robertrmartinez avatar Mar 11 '25 16:03 robertrmartinez

placement is not the same as zoneId or placementId. Instead, it should be understood as: "In which section of the page is this ad unit located?" (e.g., top-right, top-header, bottom-last, etc.). This makes it applicable to any bidder. That said, I understand that this concept can be easily misinterpreted and may only be suitable for a limited number of real-world use cases.

osazos avatar Mar 11 '25 16:03 osazos

hmmm ok. some of the examples I have are a little more descriptive than that. Almost look like part of the gam ad unit path.

EX:

    "politicalhotwire_300x250_2",
    "caja1",
    "Stol_masthead_hp_middle_1",
    "Giornaletrentino_default_bb_1",

If these are valuable to not just adagio then I understand.

robertrmartinez avatar Mar 11 '25 17:03 robertrmartinez

The thought we had was that if there is something specific to a bidder on a per adUnit basis then that is what bidder params were made for.

The trouble is that this is an RTD module, supporting but warning about adagio bidder params. IMO if the parameter is truly not an adagio parameter then the bidder should be consistent and also deprecate them.

dgirardi avatar Mar 11 '25 18:03 dgirardi

TL;DR: We are reverting the previous decision and keeping the placement parameter at the bidder params level.

For Prebid.js 9, we reworked our bidder adapter to extract the code related to our attention features and moved it to an RTD Provider. To ease the transition for publishers, we maintained some backward compatibility, allowing the RTD Provider to be used without immediately changing the configuration of all ad units.

The initial decision to move placement into ortb2Imp was driven by the fact that this signal has a generic meaning and aligns with the intended use of First Party Data. Additionally, this signal is required when a publisher uses Adagio Prebid-Server (a true prebid-server, not an adapter prebid-server) without specifically targeting Adagio as a bidder.

However, since the primary use case is using Adagio through its adapter, it makes more sense and is clearer to keep the placement parameter within the bidder params.

osazos avatar Mar 13 '25 18:03 osazos

@osazos if you are planning to make a breaking change to publisher config, please open your pr on the prebid 10 branch, which we plan to ship in 4-6 weeks

hopefully your adapter change will be backwards compatible however

patmmccann avatar Apr 07 '25 15:04 patmmccann