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

Where does the GPID come from ?

Open patmmccann opened this issue 5 years ago • 34 comments

Type of issue

The TradeDesk is encouraging publishers to provide "Global Placement ID" (GPID) data that's sometimes more granular than the GAM AdSlot. For instance, if a publisher's GAM AdSlots are all the same on a given page, TTD wants them to append that value with the div-id to make the values unique.

This desire for uniqueness is the reason that the Prebid AdSlot was created. The GPT Pre-Auction module supports publishers who want to pass the GAM AdSlot, and allows them to customize the PB AdSlot by defining a function.

So a given page might have these values:

  • ortb2Imp.ext.data.adserver.name:"gam"
  • ortb2Imp.ext.data.adserver.adslot:"/1111/homepage"
  • ortb2Imp.ext.data.pbadslot:"/1111/homepage/div-1"

The issue at hand is which of these values should a bid adapter read? Adapters are inconsistent:

  • Index reads 'ortb2Imp.ext.data.adserver.adslot'
  • Appnexus reads 'ortb2Imp.ext.data.pbadslot'
  • Others (grid/magnite/sovrn) look at both, preferring GAM AdSlot over PB AdSlot.

We need to discuss A) standardizing, B) giving the publisher some control, C) whether this issue may affect modules like Price Floors, Viewability, and other RTD modules.

There is also a docs repo issue https://github.com/prebid/prebid.github.io/pull/2928 tracking a proposal on GPID docs

patmmccann avatar Aug 31 '21 17:08 patmmccann

Good summary, thanks @patmmccann The reason that these disparate ways exist in bid modules today is that the rollout of GPID came in phases (two so far) and in phase one all of the publishers in question had descriptive GAM AdSlots (unique per slots on page,) so there was no request to have div-id be part of the GPID.

So this inconsistency came from the fact that between 4/1/21 (the start of phase 1) and 8/1/21 (the start of phase 2,) that implementing in the way Index did (Index reads ortb2Imp.ext.data.adserver.adslot) was perfectly fine as only GAM ad slot was being requested as GPID (no mention of div-id.) So Index and other SSPs did the engineering work to parse from ortb2Imp.ext.data.adserver.adslot as the GPT pre auction module made this a very reliable place for GAM AdSlot to exist, and was a good place to get GPID from. So the requirements with div-id being added now are different and create some extra work.

Now that appending div-id is being requested, and as you called out ortb2Imp.ext.data.pbadslot allows for creation of a custom function, that's likely the more reliable place to parse GPID from. In cases where a pub is using the GPT Pre Auction module and doesn't need to add div-id then pbadslot will just be equal to adserver.adslot so it works in that case. And in cases where a pub does need to append div-id they can do so with a custom function and pbadslot is still the right field to parse.

So if we're talking about standardizing as a recommendation in docs etc. then suggesting using ortb2Imp.ext.data.pbadslot as the GPID is probably the safest bet? Separately; maybe we can update the GPT pre auction module to just make pbadslot always GAM+Div-id (like w/o a custom function, but still allowing it to be overwritten w/ a custom function?)

bwoolcott avatar Aug 31 '21 18:08 bwoolcott

Whatever the logic, I recommend creating a field called gpid for the adapters to consume, so no interpretation is required in the adapters themselves.

simontrasler avatar Aug 31 '21 19:08 simontrasler

Some publishers may generate a divid dynamically, so the divid data would be acting like a transactionid. I believe GPID aims to have a unique, global and stable placement identifier?

If we create a new field called gpid, I think it would make sense to allow publishers to configure whether this will use ortb2Imp.ext.data.adserver.adslot (default?) or ortb2Imp.ext.data.pbadslot

eg: for a publisher having two 300x250 placements, one ATF and other BTF:

Case adserver.adslot pbadslot gpid choice
Case 1: One GAM adslot = 1 placement , stable div ids /1234/300x250-ATF, /1234/300x250-BTF /1234/300x250-ATF/div-1, /1234/300x250-BTF/div2 adserver.adslot and pbadslot have same cardinality
Case 2: One GAM adslot = 1 ad format, stable div ids /1234/300x250, /1234/300x250 /1234/300x250/div-1, /1234/300x250/div2 pbadslot makes more sense here
Case 3: One GAM adslot = 1 placement , dynamic div ids /1234/300x250-ATF, /1234/300x250-BTF /1234/300x250-ATF/div-73xnkj3, /1234/300x250-BTF/div-njj81jnkd adserver.adslot makes more sense, pbadslot is unique per ad request
Case 4: One GAM adslot = 1 ad format, dynamic div ids /1234/300x250, /1234/300x250 /1234/300x250/div-73xnkj3, /1234/300x250/div-njj81jnkd I'd rather rely on adserver.adslot but we lose ATF/BTF information

allanjun avatar Sep 01 '21 09:09 allanjun

Agreed that random div IDs are sometimes used @allanjun , but for the record PB AdSlot is not defined using div. Rather, PB AdSlot is defined by a function that can be whatever the publisher defines. The example in https://docs.prebid.org/features/pbAdSlot.html suggests publishers with random IDs could add a "data-adslotid" element. e.g. <div id="49849-abc-6573" data-adslotid="some stable identifier">

bretg avatar Sep 01 '21 13:09 bretg

If we create a new field called gpid, I think it would make sense to allow publishers to configure whether this will use ortb2Imp.ext.data.adserver.adslot (default?) or ortb2Imp.ext.data.pbadslot

This would make sense because pubs have already put in the work to set custom values/GPIDs at ortb2Imp.ext.data.pbadslot. We should just keep in mind that since early August, publishers requiring a more custom GPID due to non-unique adslots have been specifically working to use pbadslot for the GPID because that direction came from Trade Desk. So any work they've already done to customize a GPID at ortb2Imp.ext.data.pbadslot either via the GPT Pre-Auction Module's customPbAdSlot function or just manually shouldn't be undermined. IE., if a new gpid field is created it should not affect the work already performed by pubs to set the value at ortb2Imp.ext.data.pbadslot.

nllerandi3lift avatar Sep 02 '21 21:09 nllerandi3lift

Makes sense. The important point is to separate pbadslot the value (which may get repurposed as the GPID) from pbadslot the field.

simontrasler avatar Sep 02 '21 23:09 simontrasler

Here's a straw proposal.

We make an update the GPT Pre-Auction module to possibly write AdUnit.ortb2Imp.ext.gpid:

  1. if AdUnit.ortb2Imp.ext.gpid already exists, don't do anything. Assume the publisher or another module has provided the value.
  2. Otherwise, if a customPbAdSlot function was defined by the publisher and the result is not empty, then copy the value to AdUnit.ortb2Imp.ext.gpid
  3. Otherwise, if a value was found for GAM AdSlot, copy that to AdUnit.ortb2Imp.ext.gpid

Bid adapters would then be instructed to prefer AdUnit.ortb2Imp.ext.gpid.

bretg avatar Sep 03 '21 18:09 bretg

Looks good to me. pbadslot would still exist (whether it received the default GAM AdSlot or the result of customPbAdslot) and gpid would essentially be a duplicate.

nllerandi3lift avatar Sep 08 '21 19:09 nllerandi3lift

I may have erred in assuming Prebid is in a position to decide the GPID. Is it guaranteed that when Prebid is present, it is the only demand source? AFAIK, that is a pre-requisite to Prebid doing anything other than passing a value along.

Update: it is not guaranteed. Therefore anything in Prebid should be considered temporary, and IMO avoided.

simontrasler avatar Sep 10 '21 16:09 simontrasler

Is it guaranteed that when Prebid is present, it is the only demand source?

The same piece of inventory could wind up calling a DSP from both Prebid and OB. But it's doubtful that OB will ever support a more granular "AdSlot" -- they'll probably just tell the pub to refactor their page.

So the question becomes - what breaks if GPID is div-annotated on one path (Prebid) and vanilla on another (OB)?

bretg avatar Sep 10 '21 18:09 bretg

Clear, thanks @bretg.

what breaks if GPID is div-annotated on one path (Prebid) and vanilla on another (OB)?

Unfortunately AFAIK, the GPID concept. :-p So I don't understand what TTD is asking for.

simontrasler avatar Sep 10 '21 18:09 simontrasler

The design is that there is a consistent identifier from all sources. Getting OB to pass along the identifier is going to be required to make the effort successful universally.

JudSpencer avatar Sep 10 '21 22:09 JudSpencer

Thanks, @JudSpencer, but it opens the question -- what would you like pubs and Prebid to do while the GAM side of this works itself out?

Because it will take some time, I propose Prebid and the SSPs implement the proposal above:

  1. the GPT Pre-Auction module will explicitly create imp.ext.gpid using PB AdSlot over GAM Ad Slot
  2. bid adapters can start reading this value if they don't already
  3. publishers add the custom PB AdSlot function.

It's the timing of #3 that's in question. This could happen immediately or wait until GAM-OB catches up. The answer hinges on the tradeoff in value for the more detailed info vs the downside of discrepancy between the Prebid and OB paths.

bretg avatar Sep 13 '21 14:09 bretg

After a number of discussions, it's now uncertain whether Prebid should support imp.ext.gpid.

It appears to us that TradeDesk has conflicting requirements here:

  1. consistency between Prebid, TAM, and OB
  2. more granular ad units

Getting better granularity is pretty easy from a Prebid perspective, but consistency is beyond our control. If TradeDesk prioritizes consistency, then Prebid would recommend that adapters focus on GAM adslot and use PB adslot only for special tasks. We would not add imp.ext.gpid support in the system.

bretg avatar Sep 20 '21 18:09 bretg

Sorry that I didn't see your previous message on the topic.

We don't have conflicting asks here. The issue is that there hasn't been commitment from Google to build support for what we're asking for yet. That doesn't mean that it's not the right thing for PreBid to do.

The goal of the effort is to understand across exchanges, apples-to-apples what is transacting where and how traffic is different in different places. That means that we have to have support in several different places. We have prioritized consistency, but consistency requires cooperation from other parties that we don't have control over. Getting growing support from the prebid community of publishers will help to prioritize the ask elsewhere.

JudSpencer avatar Sep 20 '21 22:09 JudSpencer

@JudSpencer - it sounds like you're requesting for Prebid to move forward with the 'granular-GPID' proposal even if the side effect is inconsistency for an extended period. Some of us are skeptical about OB making this change anytime soon, so you may be stuck with apples-and-oranges.

bretg avatar Sep 21 '21 14:09 bretg

I understand the skepticism. Sometimes it takes a lot of momentum for Google to interrupt their product plans and fit in industry initiatives. e.g., it took over a year for support of Sellers.json and closer to two years to get their current, minimum level of SupplyChain data populated. The industry, IMO, needs to move forward on transparency initiatives though.

JudSpencer avatar Sep 21 '21 16:09 JudSpencer

@JudSpencer - we would like for you to say "yes - TradeDesk wants Prebid to build the GPID feature and publishers should use it even if the GAM changes might be a long time coming." Please confirm. Thanks.

bretg avatar Sep 22 '21 18:09 bretg

Yes - TradeDesk wants Prebid to build the GPID feature and publishers should use it even if the GAM changes might be a long time coming.

JudSpencer avatar Sep 22 '21 19:09 JudSpencer

@JudSpencer - there's been further conversation about the syntax here. We propose that instead of combing GAM ad slot and div with a slash, that we recommend the delimiter be something else: either carat (^) or semi-colon (;)

For the record, GAM docs say "Only letters, numbers, underscores, hyphens, periods, asterisks, exclamations, left angle brackets, colons, forward slashes and parentheses are allowed." in ad unit codes. Ampersand, tilda, and pound-sign are URL chars. So that leaves us with at, comma, semi-colon, dollar-sign, percent, and carat. Looking for community input on the delimiter.

Here's the revised proposal.

We make an update the GPT Pre-Auction module to possibly write AdUnit.ortb2Imp.ext.gpid:

  • if AdUnit.ortb2Imp.ext.gpid already exists, don't do anything. Assume the publisher or another module has provided the value.
  • Otherwise, if a customPbAdSlot function was defined by the publisher and the result is not empty, then copy the value to AdUnit.ortb2Imp.ext.gpid
    • Prebid recommends that in most cases the GAM adslot should be combined with the div-id with a semi-colon delimiter.
    • If the publisher uses a random div-id, however, some other value should be chosen.
  • Otherwise, if a value was found for GAM AdSlot, copy that to AdUnit.ortb2Imp.ext.gpid
  • Bid adapters are instructed to prefer AdUnit.ortb2Imp.ext.gpid.

bretg avatar Oct 04 '21 21:10 bretg