Floors Module: Analytics interface changes
Description of issue The goal of this ticket is to address a misrepresentation of an analytics condition within the Analytics Interface of the Floors Module as well as provide better logging for analytics adapters.
When the Floors Module uses the Fetch method to retrieve floors and a timeout occurs (when the auction delay time is realized before fetched floors is returned), today the Floors Module sets the skipRate to 0 if skipRate is not set in setConfig because there is no skip data to utilize. Setting the skipRate to 0 is an inaccurate representation because skipRate is not actually 0, it's really undefined.
The are two additional enhancements to logging for analytics adapters. The three changes for this ticket are the following:
- When the Floors Module code is invoked and there is no floor data available, the Floors Module should record a new attribute value of "noData" in the bidRequest[ ].floorData.location field
The below feature will be added into Prebid 4.x to prevent any loss of data for analytics adapters wishing to use this field right away.
- The introduction of a new field called "floorProvider" in the top level of the floor object or within floors.data, whose value should be a string
- If floorProvider is supplied in both the top level of floors and within the floors.data object, the floors.data object setting shall prevail
- floorProvider should function with fetch (dynamic) mode of floors, with the floorProvider field supplied at the root of the fetch object
In regards to:
The introduction of a new field called "floorProvider" in the top level of the floor object, whose value should be a string
Is there a desired default value for when none is set, or is an empty string fine? Also what would be an example of a value passed to it be?
In regards to:
The introduction of a new field called "floorProvider" in the top level of the floor object, whose value should be a string
Is there a desired default value for when none is set, or is an empty string fine? Also what would be an example of a value passed to it be?
This should an empty string when none provided. It would be unfair to favor a particular vendor. The purpose of the string is to prevent an analytics adapter from reading floors from the Floors Module when that analytics adapter is not being used as a provider.
@bszekely1 is the desire to only block the floors INPUT from other providers, but not the outflow into the analytics data on the bidRequest and bidResponse objects?
@bszekely1 is the desire to only block the floors INPUT from other providers, but not the outflow into the analytics data on the bidRequest and bidResponse objects?
This allows the analytics adapter the option to ignore floors data but read standard bidRequest and bidResponse data if the floors data is not derived from them (i.e. floor provider). Rethinking this a bit more, it might be a good idea to block floors data from being read if you are not the provider, if this is even possible.
@bszekely1 I think that sending the pre-floor data is critical, I would strongly advocate against blocking analytics access. The analytics provider should be considered the same as the publisher in terms of data visibility under the umbrella of transparency and hiding data from the publisher is not our goal. If a publisher is running two analytics vendors, one for floors, and one for other purposes I do not think we should hide data from any of their analytics partners.
Another thing to consider is that the data is in the page. It's accessible. I'd have to dig deep into JS data visibility control a bit, but it's weak in general on a purely technical bases. There are analytics methods external to Prebid, that operate outside, that could essentially be unduly advantaged if the providers who play by the rules when integrated into Prebid are excluded from data visibility.
@bszekely1 I think that sending the pre-floor data is critical, I would strongly advocate against blocking analytics access. The analytics provider should be considered the same as the publisher in terms of data visibility under the umbrella of transparency and hiding data from the publisher is not our goal. If a publisher is running two analytics vendors, one for floors, and one for other purposes I do not think we should hide data from any of their analytics partners.
Another thing to consider is that the data is in the page. It's accessible. I'd have to dig deep into JS data visibility control a bit, but it's weak in general on a purely technical bases. There are analytics methods external to Prebid, that operate outside, that could essentially be unduly advantaged if the providers who play by the rules when integrated into Prebid are excluded from data visibility.
After some reconsidering and speaking with someone internally here, yes, all the data relevant to the auction should be allowed to viewed by all analytics adapters. The goal for the provider field is not to block an analytics provider for ingesting data but to allow the analytics provider to not log floor data if it's not produced by them as a floor provider.
I removed the requirement to set skipRate to undefined when it's not defined. This is request is not a valid request because the Floors Module defaults (or defines a value) to 0 when not supplied by the publisher or a floors provider. The only scenario skipRate would be undefined is if the Floors Module code was not invoked.
It should be the job of the Analytics Adapters to log as they like when they see skipRate=0 and floors.location="noData".
Added the flexibility to set floorProvider to be within the floors.data object as well. This is to accommodate signaling of self-dececlared floorsProvider configuration. Additionally, a publisher could A/B test different floor providers and allow for only the provider's floors to be logged if they wish. We are following a very similar approach as skipRate.