Skip to content

Commit

Permalink
ConenctAd Adapter Update
Browse files Browse the repository at this point in the history
Accept multiple networkid and siteid types to fix prebid/Prebid.js#6361
  • Loading branch information
rtuschkany committed Jun 3, 2024
1 parent 2b8e8cd commit b9ff00e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 26 deletions.
4 changes: 2 additions & 2 deletions adapters/connectad/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ func TestInvalidParams(t *testing.T) {
var validParams = []string{
`{"siteId": 123456, "networkId": 123456, "bidfloor": 0.10}`,
`{"siteId": 123456, "networkId": 123456}`,
`{"siteId": 123456, "networkId": "123456", "bidfloor": 0.10}`,
`{"siteId": "123456", "networkId": 123456, "bidfloor": 0.10}`,
}

var invalidParams = []string{
`{}`,
`null`,
`{"siteId": 123456, "networkId": "123456", "bidfloor": 0.10}`,
`{"siteId": "123456", "networkId": 123456, "bidfloor": 0.10}`,
`{"siteId": 123456, "networkId": 123456, "bidfloor": "0.10"}`,
`{"siteId": "123456"}`,
`{"networkId": 123456}`,
Expand Down
21 changes: 17 additions & 4 deletions static/bidder-info/connectad.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Please uncomment the appropriate endpoint URL for your datacenter
# Europe
endpoint: "http://bidder.connectad.io/API?src=pbs"
# North/South America
# endpoint: "http://bidder-us.connectad.io/API?src=pbs"
# APAC
# endpoint: "http://bidder-apac.connectad.io/API?src=pbs"
geoscope:
- global
maintainer:
email: "[email protected]"
endpointCompression: gzip
gvlVendorID: 138
capabilities:
app:
mediaTypes:
- banner
- banner
site:
mediaTypes:
- banner
- banner
userSync:
iframe:
url: "https://cdn.connectad.io/connectmyusers.php?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb={{.RedirectURL}}"
redirect:
url: "https://sync.connectad.io/ImageSyncer?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&cb={{.RedirectURL}}"
userMacro: ""
# connectad appends the user id to end of the redirect url and does not utilize a macro
iframe:
url: "https://sync.connectad.io/iFrameSyncer?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&cb={{.RedirectURL}}"
userMacro: ""
# connectad appends the user id to end of the redirect url and does not utilize a macro
46 changes: 26 additions & 20 deletions static/bidder-params/connectad.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@

{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ConnectAd S2S dapter Params",
"description": "A schema which validates params accepted by the ConnectAd Adapter",

"type": "object",
"properties": {
"networkId": {
"type": "integer",
"description": "NetworkId"
},
"siteId": {
"type": "integer",
"description": "SiteId"
},
"bidfloor": {
"type": "number",
"description": "Requests Floorprice"
}
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ConnectAd S2S dapter Params",
"description": "A schema which validates params accepted by the ConnectAd Adapter",

"type": "object",
"properties": {
"networkId": {
"type": [
"integer",
"string"
],
"description": "NetworkId"
},
"siteId": {
"type": [
"integer",
"string"
],
"description": "SiteId"
},
"required": ["networkId", "siteId"]
}
"bidfloor": {
"type": "number",
"description": "Requests Floorprice"
}
},
"required": ["networkId", "siteId"]
}

0 comments on commit b9ff00e

Please sign in to comment.