You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev-docs/modules/floors.md
+32-20Lines changed: 32 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@ A ‘floor’ is defined as the lowest CPM price a bid will need to meet for eac
23
23
24
24
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:
25
25
26
-
27
26
- AdUnit
28
27
- GPT Slot Name
29
28
- MediaType
@@ -39,10 +38,13 @@ The entire set of floors selected by the Price Floors Module for a given auction
39
38
2. Within setConfig (Package)
40
39
3. Retrieved from a real-time data service (Dynamic)
41
40
42
-
43
41
{: .alert.alert-info :}
44
42
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.
45
43
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.
46
48
47
49
## How it Works
48
50
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
279
281
280
282
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.
281
283
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
+
282
288
{: .table .table-bordered .table-striped }
283
289
| Param | Type | Description | Default |
284
290
|---+---+---+---+---|
@@ -290,7 +296,7 @@ Schema 1 restricts floors providers or publishers to applying only one data grou
290
296
| 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 |
| 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 |
| endpoint.url | string | URL of endpoint to retrieve dynamic floor data. | - |
295
301
| data | object (required) | Floor data used by the Price Floors Module to pass floor data to bidders and floor enforcement. | - |
296
302
| 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
316
322
317
323
Schema 2 allows floors providers to A/B-test one or more floor groups, determined at auction time.
318
324
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:
321
327
- data.floorsSchemaVersion to be set to 2
322
328
- A valid modelGroups object must be set
323
329
- The field modelGroups.modelWeight is required for each model group
324
330
- 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
325
331
- If common attributes are set in both the modelGroups and root level of the data object, modelGroups attributes prevail
326
332
- 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.
328
334
- If the data.modelGroups object and the data.values (schema 1 field) are set, the data.floorsSchemaVersion will dictate what schema version is applied
329
335
330
-
331
336
While some attributes are common in both schema versions, for completeness, all valid schema 2 attributes are provided:
332
337
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
+
333
342
{: .table .table-bordered .table-striped }
334
343
| Param | Type | Description | Default |
335
344
|---+---+---+---+---|
336
345
| 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. | - |
337
347
| 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.| - |
339
348
| 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.| - |
340
354
| 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 |
341
355
| 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 |
| 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 |
| endpoint.url | string | URL of endpoint to retrieve dynamic floor data. | - |
346
361
| 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
837
852
838
853
### Floor Data Provider Interface
839
854
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.
841
856
842
857
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.
843
858
844
-
845
-
846
859
{% capture warning_note %}
847
860
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:
848
861
@@ -854,8 +867,7 @@ As a floor provider, your goal is to provide effective floors, with minimal page
854
867
{% endcapture %}
855
868
{% include /alerts/alert_important.html content=warning_note %}
856
869
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.
859
871
860
872
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.
861
873
@@ -877,9 +889,9 @@ pbjs.setConfig({
877
889
878
890
{% endhighlight %}
879
891
880
-
#### Example Response 1
892
+
#### Example Dynamic Response 1 - Schema 1
881
893
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.
883
895
884
896
{% highlight js %}
885
897
@@ -903,16 +915,17 @@ floor determined by AdUnit code and Media Type:
903
915
904
916
{% endhighlight %}
905
917
906
-
#### Example Response 2
918
+
#### Example Response 2 - Schema 1
907
919
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:
@@ -931,12 +944,11 @@ floor determined by Domain, GPT Slot, Media Type and Size:
931
944
{% endhighlight %}
932
945
933
946
934
-
#### Example Response 3
947
+
#### Example Response 3 - Schema 2
935
948
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.
0 commit comments