Skip to content

Commit 508d35e

Browse files
authored
PBS Floor documentation (prebid#3733)
* pbs floors early draft * first draft * 2nd review * added beta notice
1 parent 6798ee1 commit 508d35e

File tree

5 files changed

+413
-22
lines changed

5 files changed

+413
-22
lines changed

_data/sidebar.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,8 +1908,8 @@
19081908
subgroup: 3
19091909

19101910
- sbSecId: 5
1911-
title: Interstitials
1912-
link: /prebid-server/features/pbs-interstitials.html
1911+
title: Floors
1912+
link: /prebid-server/features/pbs-floors.html
19131913
isHeader: 0
19141914
isSectionHeader: 0
19151915
sectionTitle:
@@ -1923,6 +1923,14 @@
19231923
sectionTitle:
19241924
subgroup: 3
19251925

1926+
- sbSecId: 5
1927+
title: Interstitials
1928+
link: /prebid-server/features/pbs-interstitials.html
1929+
isHeader: 0
1930+
isSectionHeader: 0
1931+
sectionTitle:
1932+
subgroup: 3
1933+
19261934
- sbSecId: 5
19271935
title: Stored Requests
19281936
link: /prebid-server/features/pbs-storedreqs.html
29.2 KB
Loading
60.7 KB
Loading

dev-docs/modules/floors.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ A ‘floor’ is defined as the lowest CPM price a bid will need to meet for eac
2323

2424
The module provides several ways for Prebid floors to be defined, that are used by bidder adapters to read floors and enforced on bid responses in any supported currency. The floors utilized by the Price Floors Module are defined by one or more set of rules containing any or all of the following dimensions:
2525

26-
2726
- AdUnit
2827
- GPT Slot Name
2928
- MediaType
@@ -39,10 +38,13 @@ The entire set of floors selected by the Price Floors Module for a given auction
3938
2. Within setConfig (Package)
4039
3. Retrieved from a real-time data service (Dynamic)
4140

42-
4341
{: .alert.alert-info :}
4442
Even though floors are defined with five pre-configured dimensions, it’s possible to extend the list of dimensions to attributes of the page, user, auction or other data by supplying a dimension matching function. For example, a publisher can provide a matching function that returns the device type to allow the Floor module to use device type as an attribute within a prebid floor rules file.
4543

44+
Note that Prebid Server also supports a [floors feature](/prebid-server/features/pbs-floors.html) that is very similar to the Prebid.js module. They both share Schema 2, and there are PBS-specific notes below.
45+
The expectation with the Prebid Server floors feature is that
46+
Publishers will use it mainly for mobile app and AMP scenarios.
47+
Web sites running Prebid.js will utilize this client-side module.
4648

4749
## How it Works
4850
There are several places where the Floor module changes the behavior of the Prebid.js auction process. Below is a diagram describing the general flow of the Price Floors Module:
@@ -279,6 +281,10 @@ The examples above covered several different scenarios where floors can be appli
279281

280282
Schema 1 restricts floors providers or publishers to applying only one data group. To test more than one floor group, floor providers or publishers are required to reset the data set with new rules after each request bids.
281283

284+
{: .alert.alert-info :}
285+
Note: if you're a dynamic floor provider service, your response must be
286+
a subset that will be merged under the 'data' object.
287+
282288
{: .table .table-bordered .table-striped }
283289
| Param | Type | Description | Default |
284290
|---+---+---+---+---|
@@ -290,7 +296,7 @@ Schema 1 restricts floors providers or publishers to applying only one data grou
290296
| enforcement.enforcePBS | boolean | If set to true, the Price Floors Module will signal to Prebid Server to pass floors to it’s bid adapters and enforce floors. If set to false, the pbjs should still pass matched bid request floor data to PBS, however no enforcement will take place. | false |
291297
| enforcement.floorDeals | boolean | Enforce floors for deal bid requests. | false |
292298
| enforcement.bidAdjustment | boolean | If true, the Price Floors Module will use the bidAdjustment function to adjust the floor per bidder. If false (or no bidAdjustment function is provided), floors will not be adjusted. Note: Setting this parameter to false may have unexpected results, such as signaling a gross floor when expecting net or vice versa. | true |
293-
| endpoint | object | Controls behavior for dynamically retrieving floors. | - |
299+
| endpoint | object | Prebid.js only: controls behavior for dynamically retrieving floors. | - |
294300
| endpoint.url | string | URL of endpoint to retrieve dynamic floor data. | - |
295301
| data | object (required) | Floor data used by the Price Floors Module to pass floor data to bidders and floor enforcement. | - |
296302
| data.floorProvider | string | Optional atribute (as of prebid version 4.2) used to signal to the Floor Provider's Analytics adapter their floors are being applied. They can opt to log only floors that are applied when they are the provider. If floorProvider is supplied in both the top level of the floors object and within the data object, the data object's configuration shall prevail.| - |
@@ -316,31 +322,40 @@ Schema 1 restricts floors providers or publishers to applying only one data grou
316322

317323
Schema 2 allows floors providers to A/B-test one or more floor groups, determined at auction time.
318324

319-
The following principles apply to schema 2:
320-
- The below attributes are required:
325+
The following principles apply to Schema 2:
326+
- These attributes are required:
321327
- data.floorsSchemaVersion to be set to 2
322328
- A valid modelGroups object must be set
323329
- The field modelGroups.modelWeight is required for each model group
324330
- If one of the model weights is missing, no schema 2 floor will be set and the Price Floors Module will look in other locations for floor definitions
325331
- If common attributes are set in both the modelGroups and root level of the data object, modelGroups attributes prevail
326332
- The Schema 2 data model can only be applied in Package level (i.e. directly in setConfig) or Dynamic level
327-
- Sampling weights are applied at the auction level. Each new auction the dice will be rolled
333+
- Sampling weights are applied at the auction level. Each new auction the dice will be rolled.
328334
- If the data.modelGroups object and the data.values (schema 1 field) are set, the data.floorsSchemaVersion will dictate what schema version is applied
329335

330-
331336
While some attributes are common in both schema versions, for completeness, all valid schema 2 attributes are provided:
332337

338+
{: .alert.alert-info :}
339+
Note: if you're a dynamic floor provider service, your response must be
340+
a subset that will be merged under the 'data' object.
341+
333342
{: .table .table-bordered .table-striped }
334343
| Param | Type | Description | Default |
335344
|---+---+---+---+---|
336345
| floorMin | float | The mimimum CPM floor used by the module (as of 4.13). The module will take the greater of floorMin and the matched rule CPM when evaluating getFloor() and enforcing floors. | - |
346+
| floorMinCur | float | Prebid Server only: the currency used for the floorMin value. | - |
337347
| floorProvider | string | Optional atribute (as of prebid version 4.1) used to signal to the Floor Provider's Analytics adapter their floors are being applied. They can opt to log only floors that are applied when they are the provider. If floorProvider is supplied in both the top level of the floors object and within the data object, the data object's configuration shall prevail.| - |
338-
| enforcement | object | Controls the enforcement behavior within the module.| - |
339348
| skipRate | integer | skipRate is a random function whose input value is any integer 0 through 100 to determine when to skip all floor logic, where 0 is always use floor data and 100 is always skip floor data. The use case is for publishers or floor providers to learn bid behavior when floors are applied or skipped. Analytics adapters will have access to model version (if defined) when skipped is true to signal the module is in floors mode. If skipRate is supplied in both the root level of the floors object and within the data object, the skipRate configuration within the data object shall prevail. | 0 |
349+
| enabled | boolean | Prebid Server only: provides a request level override to disable server-side floor activity. If there's server-side floor config, it must also be true in order for floor activity to take place. | true |
350+
| fetchStatus | string | Prebid Server only: this is a read-only field set by the Prebid-Server floors feature to let analytics adapters know whether the floors data used was dynamically fetched. | n/a |
351+
| skipped | boolean | Prebid Server only: this is a read-only field set by the Prebid-Server floors feature to let analytics adapters know whether the 'skipRate' feature was invoked. i.e. this value is 'true' when the floor activity has been turned off by the skipRate, and 'false' otherwise. | n/a |
352+
| location | string | Prebid Server only: this is a read-only field set by the Prebid-Server floors feature to let analytics adapters know where the floors data came from. Possible values are: 'request', 'fetch' or 'noData'. | n/a |
353+
| enforcement | object | Controls the enforcement behavior within the module.| - |
340354
| enforcement.enforceJS | boolean | If set to true, the module will provide floors to bid adapters for bid request matched rules and suppress any bids not exceeding a matching floor. If set to false, the module will still provide floors for bid adapters, but there will be no floor enforcement.| true |
341355
| enforcement.enforcePBS | boolean | If set to true, the module will signal to Prebid Server to pass floors to it’s bid adapters and enforce floors. If set to false, Prebid.js should still pass matched bid request floor data to Prebid Server, however no enforcement will take place. | false |
342356
| enforcement.floorDeals | boolean | Enforce floors for deal bid requests. | false |
343357
| enforcement.bidAdjustment | boolean | If true, the module will use the bidAdjustment function to adjust the floor per bidder. If false (or no bidAdjustment function is provided), floors will not be adjusted. Note: Setting this parameter to false may have unexpected results, such as signaling a gross floor when expecting net or vice versa. | true |
358+
| enforcement.enforceRate | integer | Prebid Server only: Defines a percentage for how often bid response enforcement activity should take place given that the floors feature is active. If the floors feature is skipped due to skipRate, this has no affect. For every non-skipped auction, this percent of them should be enforced: i.e. bids discarded. This feature lets publishers ease into enforcement in case bidders aren't adhering to floor rules. | 100 |
344359
| endpoint | object | Controls behavior for dynamically retrieving floors. | - |
345360
| endpoint.url | string | URL of endpoint to retrieve dynamic floor data. | - |
346361
| data | object (required) | Floor data used by the module to pass floor data to bidders and floor enforcement. | - |
@@ -837,12 +852,10 @@ Enforced floor: 10.01
837852

838853
### Floor Data Provider Interface
839854

840-
Floor data providers can supply data to publishers either within the setConfig as part of a Prebid.js Package if the provider is also a host provider of the Prebid library, or via a real-time Dynamic fetch, prior to the auction.
855+
Floor data can be supplied to publishers either within the setConfig as part of a Prebid.js Package if the provider is also a host provider of the Prebid library, or via a real-time Dynamic fetch, prior to the auction.
841856

842857
Data providers can optionally build Analytics Adapters to ingest bid data within Prebid for algorithm learning and review floor performance. Please refer to the Analytics Interface section for more details.
843858

844-
845-
846859
{% capture warning_note %}
847860
As a floor provider, your goal is to provide effective floors, with minimal page impact. If you are performing a Dynamic fetch to retrieve data prior to auctions, the following recommendations are advised to reduce page performance issues:
848861

@@ -854,8 +867,7 @@ As a floor provider, your goal is to provide effective floors, with minimal page
854867
{% endcapture %}
855868
{% include /alerts/alert_important.html content=warning_note %}
856869

857-
For Dynamic fetches, the Price Floors Module will perform a GET request to the supplied endpoint, that must return valid JSON, formatted like the data object in the “setConfig” Package configuration.
858-
870+
For Dynamic fetches, the Price Floors Module will perform a GET request to the supplied endpoint, that must return valid JSON, which will be merged into the data object in the “setConfig” Package configuration. In otherwords, the schema used for dynamic fetches is a subset of the full schema.
859871

860872
On rule creation, we recommend supplying various rules with catch-all \(\*\) values with associated floors. This is to accommodate bid adapters who cannot retrieve floors on a per size basis, as well as using various permutations of rules with “\*” values to match auctions that do not have an exact match on a specific rule. Please refer to the Rule Selection Process when determining floors as attribute order and number of “\*”s may have an impact on which rule is selected.
861873

@@ -877,9 +889,9 @@ pbjs.setConfig({
877889

878890
{% endhighlight %}
879891

880-
#### Example Response 1
892+
#### Example Dynamic Response 1 - Schema 1
881893

882-
floor determined by AdUnit code and Media Type:
894+
In this example, the floor is determined by AdUnit code and Media Type. Note that the response does not contain the 'data' object because everything in the response is merged there.
883895

884896
{% highlight js %}
885897

@@ -903,16 +915,17 @@ floor determined by AdUnit code and Media Type:
903915

904916
{% endhighlight %}
905917

906-
#### Example Response 2
918+
#### Example Response 2 - Schema 1
907919

908-
floor determined by Domain, GPT Slot, Media Type and Size:
920+
In this example, the floor is determined by Domain, GPT Slot, Media Type and Size:
909921

910922
{% highlight js %}
911923

912924
{
913925
currency: 'EU',
914926
skipRate: 20,
915927
modelVersion: ‘High_skip_rate’
928+
916929
schema: {
917930
fields: [ 'domain', 'gptSlot', 'mediaType', 'size' ]
918931
},
@@ -931,12 +944,11 @@ floor determined by Domain, GPT Slot, Media Type and Size:
931944
{% endhighlight %}
932945

933946

934-
#### Example Response 3
947+
#### Example Response 3 - Schema 2
935948

936-
Floors Schema version 2
949+
In this example, the floor is determined by domain, gptSlot, mediaType, and size. Note again that dynamic floor responses are merged into the 'data' level of the schema.
937950

938951
{% highlight js %}
939-
940952
{
941953
"currency": "USD",
942954
"floorsSchemaVersion":2,

0 commit comments

Comments
 (0)