Skip to content

Commit 7712fb9

Browse files
committed
Merge remote-tracking branch 'prebid/master'
2 parents d4f8c0f + ab5dc73 commit 7712fb9

File tree

2 files changed

+268
-1
lines changed

2 files changed

+268
-1
lines changed

dev-docs/bidders/inmobi.md

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ title: InMobi
44
description: InMobi Bidder Adapter
55
biddercode: inmobi
66
tcfeu_supported: true
7-
usp_supported: false
7+
usp_supported: true
88
gvl_id: 333
99
coppa_supported: true
1010
schain_supported: true
1111
media_types: banner, video, native
1212
pbs: true
1313
pbs_app_supported: true
1414
sidebarType: 1
15+
pbjs: true
1516
---
1617

1718
### Note
@@ -30,6 +31,97 @@ To opt out of InMobi ads on web inventory the user needs to visit the Opt-out pa
3031
### Bid Params
3132

3233
{: .table .table-bordered .table-striped }
34+
3335
| Name | Scope | Description | Example | Type |
3436
|---------------|----------|-----------------------|-----------|-----------|
3537
| `plc` | required | Placement ID | `'1234'` | `string` |
38+
39+
### First Party Data
40+
41+
Inmobi supports both `ortb2` and `ortb2Imp` methods to set [First Party Data](https://docs.prebid.org/features/firstPartyData.html).
42+
43+
The standard Open RTB properties supported from `ortb2` / `ortb2Imp` are described in the following table.
44+
45+
{: .table .table-bordered .table-striped }
46+
47+
| Name | Scope | Description | Example | Type |
48+
|-------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|-----------|
49+
| `ortb2Imp.instl` | optional | Details on interstitial/full-screen, 1 indicates that the ad is interstitial or full-screen, while 0 means it is not. | `1` | `integer` |
50+
| `ortb2Imp.rwdd` | optional | Specifies if the user receives a reward for viewing the ad: 0 for no, and 1 for yes. | `1` | `integer` |
51+
| `ortb2.user` | optional | Information about the advertising device's human user, provided through an OpenRTB User object. | N/A | `object` |
52+
| `ortb2.site` | optional | Information about the publisher's website provided through an OpenRTB Site object. | N/A | `object` |
53+
| `ortb2.device` | optional | Information about the user's device provided through an OpenRTB device object. | N/A | `object` |
54+
| `ortb2.bcat` | optional | Blocked advertiser categories using the IAB content categories. | `[ "IAB25" ]` | `string array` |
55+
| `ortb2.badv` | optional | Block list of advertisers by their domains | `[ "ford.com" ]` | `string array` |
56+
| `ortb2.regs` | optional | Regulatory conditions in effect for all impressions in this bid request. | N/A | `object` |
57+
58+
Besides these standard properties, `ext` field can be used to send any publisher specific data which may have been discussed with a Inmobi partner manager.
59+
60+
### Example Ad-Units
61+
62+
## Banner
63+
64+
```javascript
65+
var adUnits = [{
66+
code: 'div-gpt-ad-1460505748561-0',
67+
mediaTypes: {
68+
banner: {
69+
sizes: [[300, 250]],
70+
}
71+
},
72+
bids: [{
73+
bidder: 'inmobi',
74+
params: {
75+
plc: '1719108420057' // Mandatory
76+
}
77+
}]
78+
}];
79+
```
80+
81+
## Video
82+
83+
```javaScript
84+
var adUnits = [{
85+
code: 'div-gpt-ad-1460505748561-0',
86+
mediaTypes: {
87+
video: {
88+
playerSize : [300,250],
89+
mimes : ["video/x-ms-wmv", "video/mp4"],
90+
minduration : 0,
91+
maxduration: 30,
92+
protocols : [1,2],
93+
api: [1, 2, 4, 6],
94+
protocols: [3, 4, 7, 8, 10],
95+
placement: 1,
96+
plcmt: 1
97+
}
98+
},
99+
// Replace this object to test a new Adapter!
100+
bids: [{
101+
bidder: 'inmobi',
102+
params: {
103+
plc: '1443164204446401' //Mandatory
104+
}
105+
}]
106+
}];
107+
```
108+
109+
## Native
110+
111+
```javascript
112+
var adUnits = [{
113+
code: 'div-gpt-ad-1460505748561-0',
114+
mediaTypes: {
115+
native: {
116+
type: 'image'
117+
}
118+
},
119+
bids: [{
120+
bidder: 'inmobi',
121+
params: {
122+
plc: '10000033152',
123+
bidfloor: 0.9
124+
}
125+
}]
126+
}];
127+
```
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
layout: page_v2
3+
page_type: pbs-module
4+
title: Prebid Server Greenbids Real Time Data Module
5+
display_name : Greenbids Real Time Data Module
6+
sidebarType : 5
7+
---
8+
9+
# Greenbids Real Time Data Module
10+
11+
## Overview
12+
13+
Greenbids Real Time Data module filters bidders SSPs listed in the `imp[].ext.prebid.bidder` of the bid request.
14+
To perform the filtering the module uses AI to predict the bidding probability of bid per SSP for each `imp` for the given bid request.
15+
This bidding probability is used to choose to send the bid request or not, according to the performance constraints applied by the partner publisher.
16+
17+
The RTD module uses 2 artefacts that are fetched from the Greenbids Google Cloud Storage bucket
18+
19+
- ML predictor in `.onnx` format: used to predict the bidding probability
20+
- Probability thresholds in `.json` format: used to convert the bidding probability to a binary choice
21+
22+
## Configuration
23+
24+
### Execution Plan
25+
26+
This module supports running at:
27+
28+
- processed-auction-request: this is where PBS bid request enrichments
29+
are done before customizing it to a particular bidder in the auction.
30+
31+
### Account-Level Config
32+
33+
Here's an example of the account config used in PBS-Java:
34+
35+
```yaml
36+
hooks:
37+
greenbids-real-time-data:
38+
enabled: true
39+
host-execution-plan: >
40+
{
41+
"endpoints": {
42+
"/openrtb2/auction": {
43+
"stages": {
44+
"processed-auction-request": {
45+
"groups": [
46+
{
47+
"timeout": 100,
48+
"hook-sequence": [
49+
{
50+
"module-code": "greenbids-real-time-data",
51+
"hook-impl-code": "greenbids-real-time-data-processed-auction-request-hook"
52+
}
53+
]
54+
}
55+
]
56+
}
57+
}
58+
}
59+
}
60+
}
61+
```
62+
63+
### List of module configuration options
64+
65+
- `google-cloud-greenbids-project`: Google Cloud project associated with Greenbids
66+
- `gcs-bucket-name`: Google Cloud Storage (GCS) bucket used to fetch the artefacts ([ONNX](https://onnx.ai/) model and thresholds `.json`) necessary for prediction
67+
- `cache-expiration-minutes`: The duration (in minutes) after which cached model and thresholds should be considered expired and refreshed
68+
- `geo-lite-country-path`: URL to the geo-ip database
69+
- `onnx-model-cache-key-prefix`: prefix necessary for getting cached ONNX model
70+
- `thresholds-cache-key-prefix`: prefix necessary for getting cached throttling thresholds
71+
72+
```yaml
73+
greenbids-real-time-data:
74+
google-cloud-greenbids-project: "greenbids-357713"
75+
gcs-bucket-name: "greenbids-europe-west1-prebid-server-staging"
76+
cache-expiration-minutes: 15
77+
geo-lite-country-path: "https://git.io/GeoLite2-Country.mmdb"
78+
onnx-model-cache-key-prefix: "onnxModelRunner_"
79+
thresholds-cache-key-prefix: "throttlingThresholds_"
80+
```
81+
82+
### Publisher bid request settings
83+
84+
The activated partner publishers add their configs direclty into `bid-request.json`
85+
where they indicate the activation of our module
86+
in bid request extenstion `bid-request.ext.prebid.analytics.greenbids`
87+
for [Analytics Reporter](https://docs.prebid.org/prebid-server/pbs-modules/greenbids-analytics-reporter.html) and
88+
`bid-request.ext.prebid.analytics.greenbids-rtd` for Greenbids RTD Module.
89+
90+
The list of the parameters necessary for RTD module activation is as follows:
91+
92+
| Parameter | Scope | Description | Example | Type |
93+
|-----------------|-------------------|-----------------------------------------------------------------------------------------------------|-----------------------|--------------|
94+
| pbuid | required | The Greenbids Publisher ID | greenbids-publisher-1 | string |
95+
| targetTpr | required | Expected retained opportunities ratio [0-1] | 0.9 | float |
96+
| explorationRate | required | Ratio of traffic without filtering used for training ML model [0-1] (a value of 0.1 will filter 90% of the traffic) | 0.1 | float |
97+
98+
Here's an example of how a PBS partner publisher setup using both Greenbids RTD Module and Greenbids AnalyticsReporter should look like:
99+
100+
```json
101+
"ext": {
102+
"prebid": {
103+
"analytics": {
104+
// extension for Greenbids Analytics Reporter
105+
"greenbids": {
106+
"pbuid": "PBUID_FROM_GREENBIDS",
107+
"greenbidsSampling": 0.01
108+
},
109+
// extension for Greenbids Real Time Data Module
110+
"greenbids-rtd": {
111+
"pbuid": "PBUID_FROM_GREENBIDS",
112+
"targetTpr": 0.95,
113+
"explorationRate": 0.001
114+
}
115+
}
116+
}
117+
}
118+
```
119+
120+
### Enable for Spring Boot
121+
122+
In order to allow the module to be picked up by PBS-Java, a Spring Boot configuration property `hooks.greenbids-real-time-data.enabled` must be set to `true`.
123+
124+
Here's an example of how your PBS configuration YAML should look like:
125+
126+
```YAML
127+
hooks:
128+
greenbids-real-time-data:
129+
enabled: true
130+
```
131+
132+
## Analytics Tags
133+
134+
The RTD module also communicates the filtering results with the `GreenbidsAnalyticsReporter` via [AnalyticsTags](https://docs.prebid.org/prebid-server/developers/module-atags.html).
135+
Here we populate analytics result of analytics tags for each `imp` the with:
136+
137+
- `fingerprint`: greenbidsId
138+
- `isKeptInAuction`: map of booleans for each bidder whether we keep them in auction or not for the given imp
139+
- `isExploration`: flag that is necessary to isolate the training data
140+
141+
The analytics tag is then parsed by the AnalyticsReporter from `HookExecutionContext`
142+
and its content added to the analytics payload sent to Greenbids server. The exploration part of traffic is split randomly with the ratio defined for each partner publisher
143+
per bid requests and is not filtered by the RTD module.
144+
145+
Here's an example analytics tag that might be produced for use in an analytics adapter:
146+
147+
```json
148+
[{
149+
"pub_banniere_haute": {
150+
"greenbids": {
151+
"fingerprint": "ad63524e-b13f-4359-a975-dba9b5dc08f4",
152+
"keptInAuction": {
153+
"improvedigital": false,
154+
"appnexus": true,
155+
"pubmatic": false,
156+
"rubicon": true,
157+
"teads": false
158+
},
159+
"isExploration": false
160+
},
161+
"tid": "2c445309-06b2-47b2-a724-4aeef15faeb8"
162+
}
163+
}]
164+
```
165+
166+
## Maintainer contacts
167+
168+
For any questions and suggestions please reach out to our team for more information [greenbids.ai](https://greenbids.ai).
169+
170+
Or just open new [issue](https://github.com/prebid/prebid-server-java/issues/new) or [pull request](https://github.com/prebid/prebid-server-java/pulls) in this repository.
171+
172+
## Further Reading
173+
174+
- [Prebid Server Module List](/prebid-server/pbs-modules/index.html)
175+
- [Building a Prebid Server Module](/prebid-server/developers/add-a-module.html)

0 commit comments

Comments
 (0)