diff --git a/adapters/consumable/consumable.go b/adapters/consumable/consumable.go index 9969ea3796e..0e16497774c 100644 --- a/adapters/consumable/consumable.go +++ b/adapters/consumable/consumable.go @@ -40,6 +40,8 @@ type bidRequest struct { Coppa bool `json:"coppa,omitempty"` SChain openrtb2.SupplyChain `json:"schain"` Content *openrtb2.Content `json:"content,omitempty"` + GPP string `json:"gpp,omitempty"` + GPPSID []int8 `json:"gpp_sid,omitempty"` } type placement struct { @@ -192,6 +194,14 @@ func (a *ConsumableAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo * body.Coppa = request.Regs != nil && request.Regs.COPPA > 0 + if request.Regs != nil && request.Regs.GPP != "" { + body.GPP = request.Regs.GPP + } + + if request.Regs != nil && request.Regs.GPPSID != nil { + body.GPPSID = request.Regs.GPPSID + } + if request.Site != nil && request.Site.Content != nil { body.Content = request.Site.Content } else if request.App != nil && request.App.Content != nil { diff --git a/adapters/consumable/consumable/supplemental/simple-banner-gpp.json b/adapters/consumable/consumable/supplemental/simple-banner-gpp.json new file mode 100644 index 00000000000..9b2e3d75031 --- /dev/null +++ b/adapters/consumable/consumable/supplemental/simple-banner-gpp.json @@ -0,0 +1,130 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [{"w": 728, "h": 250}] + }, + "ext": { + "bidder": { + "networkId": 11, + "siteId": 32, + "unitId": 42 + } + } + } + ], + "device": { + "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36", + "ip": "123.123.123.123" + }, + "site": { + "domain": "www.some.com", + "page": "http://www.some.com/page-where-ad-will-be-shown" + }, + "regs": { + "gpp": "gppString", + "gpp_sid": [7] + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://e.serverbid.com/api/v2", + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ], + "User-Agent": [ + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36" + ], + "X-Forwarded-For": [ + "123.123.123.123" + ], + "Forwarded": [ + "for=123.123.123.123" + ], + "Origin": [ + "http://www.some.com" + ], + "Referer": [ + "http://www.some.com/page-where-ad-will-be-shown" + ] + }, + "body": { + "placements": [ + { + "adTypes": [2730], + "divName": "test-imp-id", + "networkId": 11, + "siteId": 32, + "unitId": 42 + } + ], + "schain": { + "complete": 0, + "nodes": null, + "ver": "" + }, + "networkId": 11, + "siteId": 32, + "unitId": 42, + "time": 1451651415, + "url": "http://www.some.com/page-where-ad-will-be-shown", + "includePricingData": true, + "user":{}, + "enableBotFiltering": true, + "parallel": true, + "gpp": "gppString", + "gpp_sid": [7] + } + }, + "mockResponse": { + "status": 200, + "body": { + "decisions": { + "test-imp-id": { + "adId": 1234567890, + "pricing": { + "clearPrice": 0.5 + }, + "width": 728, + "height": 250, + "impressionUrl": "http://localhost:8080/shown", + "contents" : [ + { + "body": "Remember this: https://www.google.com/search?q=blink+tag ?" + } + ] + } + } + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "test-request-id", + "impid": "test-imp-id", + "price": 0.5, + "adm": "Remember this: https://www.google.com/search?q=blink+tag ?", + "crid": "1234567890", + "exp": 30, + "w": 728, + "h": 250 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/static/bidder-info/consumable.yaml b/static/bidder-info/consumable.yaml index e1c4fc9b986..cc290149be2 100644 --- a/static/bidder-info/consumable.yaml +++ b/static/bidder-info/consumable.yaml @@ -11,6 +11,8 @@ capabilities: - banner userSync: redirect: - url: "https://e.serverbid.com/udb/9969/match?gdpr={{.GDPR}}&euconsent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redir={{.RedirectURL}}" + url: "https://e.serverbid.com/udb/9969/match?gdpr={{.GDPR}}&euconsent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}" userMacro: "" # consumable appends the user id to end of the redirect url and does not utilize a macro +openrtb: + gpp-supported: true