Skip to content

Commit

Permalink
Criteo bid adapter: add pubid/uid fields in the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
v.raybaud committed Jan 22, 2025
1 parent f3b5bce commit 6ec495c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
8 changes: 8 additions & 0 deletions adapters/criteo/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ var validParams = []string{
`{"zoneId": 123456, "networkId": 78910}`,
`{"zoneid": 0, "networkid": 0}`,
`{"zoneId": 0, "networkId": 0}`,
`{"zoneid": 123456, "pubid": "testpubid"}`,
`{"zoneid": 123456, "uid": 100}`,
`{"zoneid": 123456, "networkid": 78910, "pubid": "testpubid"}`,
`{"zoneid": 123456, "networkid": 78910, "uid": 100}`,
`{"zoneid": 123456, "networkid": 78910, "uid": 100, "pubid": "testpubid"}`,
`{"networkId": 78910, "pubid": "testpubid"}`,
`{"networkid": 78910, "uid": 100}`,
`{"networkid": 78910, "uid": 100, "pubid": "testpubid"}`,
}

var invalidParams = []string{
Expand Down
6 changes: 4 additions & 2 deletions openrtb_ext/imp_criteo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package openrtb_ext

// ExtImpCriteo defines the contract for bidrequest.imp[i].ext.prebid.bidder.criteo
type ExtImpCriteo struct {
ZoneID int64 `json:"zoneId"`
NetworkID int64 `json:"networkId"`
ZoneID int64 `json:"zoneId"`
NetworkID int64 `json:"networkId"`
UID int64 `json:"uid"`
PubID string `json:"pubid"`
}
10 changes: 10 additions & 0 deletions static/bidder-params/criteo.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
"type": "integer",
"description": "Impression's network ID, preferred.",
"minimum": 0
},
"pubid": {
"type": "string",
"description": "Impression's publisher ID.",
"minLength": 1
},
"uid": {
"type": "integer",
"description": "Impression's ad unit id.",
"minimum": 0
}
},
"anyOf": [
Expand Down

0 comments on commit 6ec495c

Please sign in to comment.