Skip to content

Commit

Permalink
Merge branch 'master' into add-rediads-bid-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
rediads authored Dec 9, 2024
2 parents 06270b7 + 2bd11ce commit 774ae65
Show file tree
Hide file tree
Showing 14 changed files with 312 additions and 146 deletions.
Binary file modified assets/images/prebid-server/module-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions dev-docs/analytics/yandex.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Disclosure: The adapter utilizes the Metrica Tag build based on [github.com/yand

2. **Insert Counter Initialization Code:**

Retrieve the counter initialization code from the Yandex Metrica settings page at `https://metrica.yandex.com/settings?id={counterId}`, where `{counterId}` is your counter ID, and embed it into your website's HTML.
Retrieve the counter initialization code from the Yandex Metrica settings page at [metrica.yandex.com/r/settings](https://metrica.yandex.com/r/settings), and embed it into your website's HTML.

3. **Initialize the Adapter in Prebid.js:**

Expand All @@ -43,4 +43,4 @@ Disclosure: The adapter utilizes the Metrica Tag build based on [github.com/yand

## Accessing Analytics Data

You can view the collected analytics data in the Yandex Metrica dashboard. Navigate to [metrika.yandex.com/dashboard](https://metrika.yandex.com/dashboard) and look for the Prebid Analytics section to analyze your data.
You can view the collected analytics data in the Yandex Metrica dashboard. Navigate to [metrika.yandex.com/r/stat/prebid_events](https://metrika.yandex.com/r/stat/prebid_events) to analyze your data.
64 changes: 14 additions & 50 deletions dev-docs/bidders/equativ.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,19 @@ The Equativ bidder adapter requires setup and approval from the Equativ service
{: .table .table-bordered .table-striped }
| Name | Scope | Description | Example | Type |
|------|-------|-------------|---------|------|
| `networkId` | required | The network identifier you have been provided with. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `siteId` | required | The placement site ID. _See **Bid Parameter Usage** notes below for more information_. |`1234` | `integer` |
| `pageId` | required | The placement page ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `formatId` | required | The placement format ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `networkId` | required | The network identifier you have been provided with. Normally required, but there are certain conditions under which this may be omitted. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `siteId` | optional | The placement site ID. _See **Bid Parameter Usage** notes below for more information_. |`1234` | `integer` |
| `pageId` | optional | The placement page ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `formatId` | optional | The placement format ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |

#### Bid Parameter Usage

Different combinations of parameters are required depending upon which ones you choose to use.

There are three options for passing bidder parameters:
There are two options for passing parameters:

- **Option 1**. Specify `networkId` by itself (_without_ `siteId`, `pageId` and `formatId`), or
- **Option 2**. Specify `siteId` _and_ `pageId` _and_ `formatId` (all together) _without_ `networkId`, or
- **Option 3**. Specify _none_ of the above parameters, and instead use either `ortb2.site.publisher.id`, `ortb2.app.publisher.id` or `ortb2.dooh.publisher.id`
- **Option 1**. Specify `networkId` by itself (_and optionally providing_ `siteId`, `pageId` and `formatId`), or
- **Option 2**. Specify either `ortb2.site.publisher.id`, `ortb2.app.publisher.id` or `ortb2.dooh.publisher.id`

See **Sample Banner Setup** for examples of these parameter options.

Expand Down Expand Up @@ -93,9 +92,9 @@ pbjs.bidderSettings = {

#### Sample Banner Setup

As mentioned in the **Bid Parameter Usage** section, when including `'equativ'` as one of your available bidders your adunit setup, there are three general approaches to how you can specify parameters. Below are examples that illustrate them.
As mentioned in the **Bid Parameter Usage** section, when including `'equativ'` as one of your available bidders your adunit setup, there are two approaches to how you can specify parameters. Below are examples that illustrate them.

#### Option 1 -- Using networkId as the only bid param
#### Option 1 -- Using networkId as a parameter

```html
<script>
Expand All @@ -113,10 +112,11 @@ As mentioned in the **Bid Parameter Usage** section, when including `'equativ'`
bids: [
{
bidder: 'equativ',
// siteId, pageId and formatId are NOT
// required if networkId is provided instead
params: {
networkId: 42,
networkId: 42, // REQUIRED
siteId: 142, // optional
pageId: 242, // optional
formatId: 342, // optional
},
},
],
Expand All @@ -129,43 +129,7 @@ As mentioned in the **Bid Parameter Usage** section, when including `'equativ'`
</script>
```

#### Option 2 - Using siteId, pageId and formatId as bid params

```html
<script>
var adUnits = [
{
code: 'div-123',
mediaTypes: {
banner: {
sizes: [
[600, 500],
[300, 600],
],
},
},
bids: [
{
bidder: 'equativ',
// all 3 of the below params are required
// when used together in place of networkId
params: {
siteId: 1,
pageId: 2,
formatId: 3,
},
},
],
},
];
pbjs.que.push(function () {
pbjs.addAdUnits(adUnits);
});
</script>
```

#### Option 3 - Using ortb2 for parameter info
#### Option 2 - Using ortb2 for parameter info

You can also, as an alternative to using bidder params, specify a value for `publisher.id` that may be nested under an `app`, `site` or `dooh` object. The Equativ adapter will, in turn, look for these property paths under the `ortb2` property of the request:

Expand Down
44 changes: 44 additions & 0 deletions dev-docs/bidders/kuantyx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: bidder
title: Kuantyx
description: Kuantyx Bid Adapter
biddercode: kuantyx
tcfeu_supported: false
usp_supported: true
media_types: video, native
safeframes_ok: true
pbjs: true
pbs: true
pbs_app_supported: true
floors_supported: true
schain_supported: true
fpd_supported: true
ortb_blocking_supported: true
multiformat_supported: will-bid-on-one
userIds: all
sidebarType: 1
aliasCode: aso
---
### Note

The Kuantyx adapter requires approval and setup. Please reach out to <[email protected]> or visit us at [kuantyx.com](https://kuantyx.com) for more details.

### Bid Params

{: .table .table-bordered .table-striped }
| Name | Scope | Description | Example | Type |
|---------------|----------|------------------|-----------------------------|-----------|
| `server` | required | Server endpoint | `https://srv.kuantyx.com` | `String` |
| `zone` | required | Zone ID | `73815` | `Integer` |

#### Video Caching

Note that the Kuantyx adapter expects a client-side Prebid Cache to be enabled for video bidding.

```js
pbjs.setConfig({
cache: {
url: 'https://prebid.adnxs.com/pbc/v1/cache'
}
});
```
2 changes: 1 addition & 1 deletion dev-docs/bidders/smilewanted.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: bidder
title: Smile Wanted
description: SmileWanted Bidder Adapter
biddercode: smilewanted
tcfeu_supported: false
tcfeu_supported: true
gvl_id: 639
usp_supported: true
coppa_supported: true
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/bidders/spinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ The SpinX bidding adapter requires setup and approval before implementation. Ple
{: .table .table-bordered .table-striped }
| Name | Scope | Description | Example | Type |
|----------|----------|-----------------------|---------------------------|----------|
| `host` | required | RTB host | `'cpm.arteabee.com'` | `string` |
| `host` | required | RTB host | `'cpm.rtads.bid'` | `string` |
| `zoneId` | required | Zone Id | 30164 | `integer` |
4 changes: 2 additions & 2 deletions dev-docs/bidders/ttd.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ var bannerAdUnit = {
#### `mediaTypes.video` Parameters

The TTD adapter for video requires certain parameters in the AdUnit's
[mediaTypes.video](https://docs.prebid.org/dev-docs/adunit-reference.html#adUnit.mediaTypes.video) definition. Specifically, `maxduration`, `api`, `mimes`, `placement`, and `protocols` are all required for video ad units. `playerSize`, `startdelay`, `playbackmethod`, and `pos` are recommended. `minduration`, `minbitrate`, `maxbitrate`, `skip`, `skipmin`, and `skipafter` are optional.
[mediaTypes.video](https://docs.prebid.org/dev-docs/adunit-reference.html#adUnit.mediaTypes.video) definition. Specifically, `maxduration`, `api`, `mimes`, `plcmt`, and `protocols` are all required for video ad units. `playerSize`, `startdelay`, `playbackmethod`, and `pos` are recommended. `minduration`, `minbitrate`, `maxbitrate`, `skip`, `skipmin`, and `skipafter` are optional.

Note: TTD does not currently support `adpod` video contexts.

Expand All @@ -108,7 +108,7 @@ var videoAdUnit = {
playerSize: [640, 480],
api: [1, 3],
mimes: ['video/mp4'],
placement: 3,
plcmt: 3,
protocols: [2, 3, 5, 6],
startdelay: -1,
playbackmethod: [1],
Expand Down
3 changes: 3 additions & 0 deletions dev-docs/modules/currency.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ currency conversion file while the bids are taking place. Alternately, the conve
be provided in the page.
1. At runtime, bids are converted to the ad server currency as needed.
1. Default rates can be provided in case the file cannot be loaded.
1. When `requestBids` is called, the Currency Module will delay the auction up to the supplied amount of time in `currency.auctionDelay` or as soon as the dynamic endpoint returns data, whichever is first.

## Currency Architecture

Expand Down Expand Up @@ -195,6 +196,8 @@ pbjs.setConfig({
"conversionRateFile": "URL_TO_RATE_FILE",
// optionally provide a default rate in case the file can't be read
"defaultRates": { "USD": { "GPB": 0.75 }}
// optionally sets the auction defer time if the file has not been loaded yet
"auctionDelay": 1000
}
});
```
Expand Down
25 changes: 24 additions & 1 deletion dev-docs/publisher-api-reference/setConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,8 @@ The `auctionOptions` object controls aspects related to auctions.
| Field | Scope | Type | Description |
|----------+---------+--------+---------------------------------------------------------------------------------------|
| `secondaryBidders` | Optional | Array of Strings | Specifies bidders that the Prebid auction will no longer wait for before determining the auction has completed. This may be helpful if you find there are a number of low performing and/or high timeout bidders in your page's rotation. |
| `suppressStaleRender` | Optional | Boolean | When true, prevents `banner` bids from being rendered more than once. It should only be enabled after auto-refreshing is implemented correctly. Default is false.
| `suppressStaleRender` | Optional | Boolean | When true, prevents `banner` bids from being rendered more than once. It should only be enabled after auto-refreshing is implemented correctly. Default is false. |
| `suppressExpiredRender` | Optional | Boolean | When true, prevent bids from being rendered if TTL is reached. Default is false.

#### Examples
{: .no_toc}
Expand Down Expand Up @@ -1212,6 +1213,28 @@ PBJS performs following actions when stale rendering is detected.

Stale winning bids will continue to be rendered unless `suppressStaleRender` is set to true. Events including `STALE_RENDER` and `BID_WON` are unaffected by this option.

Render only non-expired bids.

```javascript
pbjs.setConfig({
'auctionOptions': {
'suppressExpiredRender': true
}
});
```

#### More on Expired Rendering
{: .no_toc}

We are validating the `ttl` property before rendering an ad. If the ad has exceeded its ttl value and the `suppressExpiredRender` property is enabled, the system will suppress the rendering of the expired ad.

PBJS performs the following actions when expired rendering is detected.

* Log a warning in the browser console if pbjs_debug=true.
* Emit a `EXPIRED_RENDER` event before `BID_WON` event.

Expired winning bids will continue to be rendered unless `suppressExpiredRender` is set to true. Events including `STALE_RENDER` and `BID_WON` are unaffected by this option.

<a name="setConfig-maxNestedIframes"></a>

### maxNestedIframes
Expand Down
12 changes: 12 additions & 0 deletions prebid-server/developers/add-a-module-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ These are the available hooks that can be implemented in a module:
- org.prebid.server.hooks.v1.bidder.RawBidderResponseHook
- org.prebid.server.hooks.v1.bidder.AllProcessedBidResponsesHook
- org.prebid.server.hooks.v1.auction.AuctionResponseHook
- org.prebid.server.hooks.v1.exitpoint.ExitpointHook

In a module it is not necessary to implement all mentioned interfaces but only one (or several) required by your functionality.

Expand All @@ -131,6 +132,17 @@ Each hook interface internally extends org.prebid.server.hooks.v1.Hook basic int
- `code()` - returns module code.
- `call(...)` - returns result of hook invocation.

### Difference between AuctionResponseHook and ExitpointHook
In a nutshell, both hooks allow the modification of the OpenRTB Bid Response but in different ways.
The `AuctionResponseHook` provides a last chance to work with the Java objects that modify the auction response.
The `ExitpointHook` allows you to build a completely different response based on the received auction context. i.e. something that's not OpenRTB JSON - something like VAST. These hooks could modify the auction/amp/video response that PBS has built, or it could build another one and modify response headers accordingly.

Important Notes:

- The ExitpointHook is a powerful tool that allows rewriting the auction results, so make sure important data won't be lost for the client.
- Since the response body is not modified after calling the ExitpointHook, debug and traces won't be added by PBS-core. The exitpoint hook is responsible for adding its own tracing to the generated output.
- Analytics adapters doesn't have access to the response built by the ExitpointHook, but they receive the up-to-date auction context with the ExitpointHook execution status and analytics tags.

### Examples

1. To **update** the request in the `RawAuctionRequestHook` you would return:
Expand Down
3 changes: 2 additions & 1 deletion prebid-server/developers/add-a-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ Here's a description of the Stages of a PBS request that modules can tap into fo
| Bidder Request | The request has been customized for a particular bidder in the auction. Note that the module will be called in parallel for each bidder in the auction. | auction, amp, video | Bidder-specific bcat/badv, Bidder-specific deals |
| Raw Bidder Response | Hook functions can get access to the unprocessed bidder response. Note that the module will be called in parallel for each bidder in the auction. | auction, amp, video | Response validations |
| All Processed Bid Responses | All bids are back and PBS-core bid validations are done. | auction, amp, video | Creative validation, advanced bid validations. |
| Auction Response | Last step before the response goes back to the client | auction, amp, video | Inject ad server targeting, alternate auction winner logic |
| Auction Response | Last chance to modify the bid auction response | auction, amp, video | Inject ad server targeting, alternate auction winner logic |
| Exitpoint | (PBS-Java 3.16+) Last step before the response goes back to the client. Specify the response headers and body | auction, amp, video | Create a VAST response instead of OpenRTB. |

### 3. Figure Out Which Stages You're Going to Hook Into

Expand Down
Loading

0 comments on commit 774ae65

Please sign in to comment.