Skip to content

Commit 21d2396

Browse files
vraybaudv.raybaud
and
v.raybaud
authored
Criteo: Add pubid/uid fields in the configuration (prebid#4132)
Co-authored-by: v.raybaud <[email protected]>
1 parent 39dba15 commit 21d2396

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

adapters/criteo/params_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ var validParams = []string{
4848
`{"zoneId": 123456, "networkId": 78910}`,
4949
`{"zoneid": 0, "networkid": 0}`,
5050
`{"zoneId": 0, "networkId": 0}`,
51+
`{"zoneid": 123456, "pubid": "testpubid"}`,
52+
`{"zoneid": 123456, "uid": 100}`,
53+
`{"zoneid": 123456, "networkid": 78910, "pubid": "testpubid"}`,
54+
`{"zoneid": 123456, "networkid": 78910, "uid": 100}`,
55+
`{"zoneid": 123456, "networkid": 78910, "uid": 100, "pubid": "testpubid"}`,
56+
`{"networkId": 78910, "pubid": "testpubid"}`,
57+
`{"networkid": 78910, "uid": 100}`,
58+
`{"networkid": 78910, "uid": 100, "pubid": "testpubid"}`,
5159
}
5260

5361
var invalidParams = []string{
@@ -67,4 +75,7 @@ var invalidParams = []string{
6775
`{"zoneid": -1}`,
6876
`{"networkid": -1}`,
6977
`{"zoneid": -1, "networkid": -1}`,
78+
`{"zoneid": 0, "networkid": 0, "pubid": ""}`,
79+
`{"zoneid": 0, "networkid": 0, "pubid": null}`,
80+
`{"zoneid": 0, "networkid": 0, "uid": null}`,
7081
}

openrtb_ext/imp_criteo.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package openrtb_ext
22

33
// ExtImpCriteo defines the contract for bidrequest.imp[i].ext.prebid.bidder.criteo
44
type ExtImpCriteo struct {
5-
ZoneID int64 `json:"zoneId"`
6-
NetworkID int64 `json:"networkId"`
5+
ZoneID int64 `json:"zoneId"`
6+
NetworkID int64 `json:"networkId"`
7+
UID int64 `json:"uid"`
8+
PubID string `json:"pubid"`
79
}

static/bidder-params/criteo.json

+10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
"type": "integer",
2424
"description": "Impression's network ID, preferred.",
2525
"minimum": 0
26+
},
27+
"pubid": {
28+
"type": "string",
29+
"description": "Impression's publisher ID.",
30+
"minLength": 1
31+
},
32+
"uid": {
33+
"type": "integer",
34+
"description": "Impression's ad unit id.",
35+
"minimum": 0
2636
}
2737
},
2838
"anyOf": [

0 commit comments

Comments
 (0)