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: features/adServerKvps.md
+73-3Lines changed: 73 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,19 +23,79 @@ Here's the general way PBJS is integrated into the page:
23
23
1. Set auction parameters
24
24
1. Initiate the auction
25
25
1. Gather bid responses to send to the ad server
26
+
1. The ad server makes the final decision about which ad to render
26
27
27
28
This last step has historically been called "targeting" in Prebid.js, but really what's
28
29
sent to the adserver is a set of Key Value Pairs (KVPs) that serve several purposes:
29
30
-**Ad server line item targeting**. These values are used to pick out which line items match the request. Generally targets depend on the hb_pb attribute, but could also include hb_deal and hb_format.
30
31
-**Display**. Some of these values are needed for rendering the creative properly when the Prebid line item is chosen, including hb_adid, hb_uuid, hb_size, and for AMP/app hb_cache_host.
31
32
-**Reporting**. Some publishers rely on ad server key-values for important business reporting. The keys used for reporting could be any of the above, along with hb_source.
32
33
34
+
## Decide How The Results Will Be Used
35
+
36
+
How a publisher should configure Prebid.js to report auction results
37
+
will depend on how the final ad decision will be made. These approaches
38
+
need to be in sync.
39
+
40
+
There are four main scenarios that follow.
41
+
42
+
### Ad Server Line Items are Created Per-Bidder
43
+
44
+
In order to have header bidding compete with direct-sold demand,
45
+
a publisher can set up placeholder line items in their ad server.
46
+
47
+
Prebid.org recommends setting up separate line items
48
+
for each bidder. Benefits:
49
+
- use ad server reporting to get a view of which bidders are performing well
50
+
- control ad decisions with the ad server
51
+
- video bids have a fallback available
52
+
53
+
There are more details on this scenario in the [Ad Ops section](/adops/before-you-start.html#one-set-of-line-items-for-each-bidder).
54
+
55
+
Once implemented in the ad server, setting this up in Prebid.js is
56
+
simple, as it is the default [Send All Bids](#send-all-kvps) mode. However
57
+
to limit the number of values sent to the ad server, some flavor of
58
+
this solution like the [Top Two Bids and Deals](#top-two-bids-and-deals)
59
+
may be of interest.
60
+
61
+
{: .alert.alert-info :}
62
+
Note that `enableSendAllBids` mode can send a lot of keys to your
63
+
ad server. Though we recommend this setting, we also recommend that
64
+
publishers monitor the key traffic and [control](#controls) as necessary.
65
+
66
+
### Only One Set of Ad Server Line Items are Created
67
+
68
+
However, there are reasons a publisher may not want to create
69
+
separate line items for each bidder:
70
+
- some ad servers have a limit on how many line items can be created
71
+
- it takes work to set up line items
72
+
- the volume of key-value pairs can be a factor
73
+
74
+
So the other ad-server based solution is to create one set of line
75
+
items that is used by all bidders.
76
+
77
+
Setting this mode up in Prebid.js is done by setting [enableSendAllBids](/dev-docs/publisher-api-reference/setConfig.html#setConfig-Send-All-Bids)
78
+
to false. See the [Bare Minimum solution](#the-bare-minimum-for-display-ads) for reference.
79
+
80
+
### Post-Bid
81
+
82
+
Sometimes Prebid.js is used as a fallback. This mode is called [PostBid](/overview/what-is-post-bid.html)
83
+
84
+
In this scenario, the ad server line item is scheduled as a low-priority 'remnant' and the auction takes place when there's nothing else to serve.
85
+
The Prebid.js code is in the ad server creative, which decides the overall winner itself. See the [Post Bid Example](/dev-docs/examples/postbid.html).
86
+
87
+
### No Ad Server
88
+
89
+
Finally, a publisher may want a particular ad unit to be programmatic-only, which Prebid.js can support.
90
+
Please see the [No Ad Server Example](https://github.com/prebid/Prebid.js/blob/master/integrationExamples/noadserver/basic_noadserver.html).
91
+
33
92
## Obtaining Auction Results
34
93
35
94
### Display and Native
36
95
37
-
In the early versions of Prebid.js, there were a couple of basic functions
38
-
publishers could use to get the
96
+
In early versions of Prebid.js, there were a couple of basic functions
97
+
publishers could use to get the auction results:
98
+
39
99
-[pbjs.setTargetingForGPTAsync](/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html) - matches Google Publisher Toolkit ad slots to Prebid.js AdUnits, obtains the auction results for that adunit, and adds "targeting" values using GPT-provided functions.
40
100
-[pbjs.getAdserverTargeting](/dev-docs/publisher-api-reference/getAdserverTargeting.html) - a more generic interface for obtaining KVPs
41
101
@@ -57,9 +117,19 @@ Publishers using other ad servers need to integrate on their own
57
117
using the [pbjs.getAdserverTargetingForAdUnitCode](/dev-docs/publisher-api-reference/getAdserverTargetingForAdUnitCode.html) function to build whatever
58
118
needed to pass to the video player.
59
119
120
+
### Mobile App
121
+
122
+
The Prebid SDK does not have a direct way to control what key-value pairs will
123
+
be generated by Prebid Server. Instead, the [top-level stored request](/prebid-server/features/pbs-storedreqs.html) stored in Prebid Server defines what should be produced.
124
+
125
+
That stored request will contain the 'targeting' options needed to
126
+
match the line item setup. See the [Prebid-Server-based
127
+
targeting configuration](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#ad-server-targeting), for more detail. The rest of this document is about Prebid.js.
128
+
60
129
## Controls
61
130
62
-
Over the years, quite a few options have been added to adjust the number of bids and the exact set of KVPs sent to the ad server. This is an overlapping-but-powerful set of controls. There are often
131
+
Over the years, quite a few options have been added to to Prebid.js to adjust the number of bids and the exact set of KVPs sent to the ad server. This is an overlapping-but-powerful set of controls. There are often
132
+
63
133
multiple ways to implement the same requirements, and there's no "wrong"
0 commit comments