diff --git a/adapters/aduptech/aduptech.go b/adapters/aduptech/aduptech.go new file mode 100644 index 0000000000..9383656c8b --- /dev/null +++ b/adapters/aduptech/aduptech.go @@ -0,0 +1,147 @@ +package aduptech + +import ( + "errors" + "fmt" + "net/http" + "strings" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/currency" + "github.com/prebid/prebid-server/v3/errortypes" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint string + target_currency string +} + +func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { + bidder := &adapter{ + endpoint: config.Endpoint, + target_currency: "EUR", + } + + return bidder, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + for i := range request.Imp { + imp := &request.Imp[i] + // Check if imp comes with bid floor amount defined in a foreign currency + if imp.BidFloor > 0 && imp.BidFloorCur != "" && strings.ToUpper(imp.BidFloorCur) != a.target_currency { + + convertedValue, err := a.convertCurrency(imp.BidFloor, imp.BidFloorCur, reqInfo) + if err != nil { + return nil, err + } + + imp.BidFloorCur = a.target_currency + imp.BidFloor = convertedValue + } + } + + requestJSON, err := jsonutil.Marshal(request) + if err != nil { + return nil, []error{err} + } + + requestData := &adapters.RequestData{ + Method: "POST", + Uri: a.endpoint, + Body: requestJSON, + ImpIDs: openrtb_ext.GetImpIDs(request.Imp), + } + + return []*adapters.RequestData{requestData}, nil +} + +func (a *adapter) convertCurrency(value float64, cur string, reqInfo *adapters.ExtraRequestInfo) (float64, []error) { + convertedValue, err := reqInfo.ConvertCurrency(value, cur, a.target_currency) + + if err != nil { + var convErr currency.ConversionNotFoundError + if errors.As(err, &convErr) { + + // try again by first converting to USD + // then convert to target_currency + convertedValue, err = reqInfo.ConvertCurrency(value, cur, "USD") + + if err != nil { + return 0, []error{err} + } + + convertedValue, err = reqInfo.ConvertCurrency(convertedValue, "USD", a.target_currency) + + if err != nil { + return 0, []error{err} + } + } else { + return 0, []error{err} + } + } + return convertedValue, nil +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if responseData.StatusCode == http.StatusNoContent { + return nil, nil + } + + if responseData.StatusCode == http.StatusBadRequest { + err := &errortypes.BadInput{ + Message: "Unexpected status code: 400. Run with request.debug = 1 for more info.", + } + return nil, []error{err} + } + + if responseData.StatusCode != http.StatusOK { + err := &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode), + } + return nil, []error{err} + } + + var response openrtb2.BidResponse + if err := jsonutil.Unmarshal(responseData.Body, &response); err != nil { + return nil, []error{err} + } + + bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp)) + bidResponse.Currency = response.Cur + + var errs []error + for _, seatBid := range response.SeatBid { + for i, bid := range seatBid.Bid { + bidType, err := getBidType(bid.MType) + if err != nil { + errs = append(errs, err) + continue + } + + bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + }) + } + } + + return bidResponse, errs +} + +func getBidType(markupType openrtb2.MarkupType) (openrtb_ext.BidType, error) { + switch markupType { + case openrtb2.MarkupNative: + return openrtb_ext.BidTypeNative, nil + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + default: + return "", &errortypes.BadServerResponse{ + Message: fmt.Sprintf("Unknown markup type: %d", markupType), + } + } +} diff --git a/adapters/aduptech/aduptech_test.go b/adapters/aduptech/aduptech_test.go new file mode 100644 index 0000000000..565008d2fa --- /dev/null +++ b/adapters/aduptech/aduptech_test.go @@ -0,0 +1,20 @@ +package aduptech + +import ( + "testing" + + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder(openrtb_ext.BidderAdUpTech, config.Adapter{ + Endpoint: "https://example.com/rtb/bid"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) + + if buildErr != nil { + t.Fatalf("Builder returned unexpected error %v", buildErr) + } + + adapterstest.RunJSONBidderTest(t, "aduptechtest", bidder) +} diff --git a/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency-intermediate.json b/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency-intermediate.json new file mode 100644 index 0000000000..c50f56f00b --- /dev/null +++ b/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency-intermediate.json @@ -0,0 +1,129 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "bidfloor": 1.0, + "bidfloorcur": "AUD", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + }], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + }, + "USD": { + "AUD": 2.0 + } + }, + "usepbsrates": false + } + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com/rtb/bid", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 10, + "bidfloorcur": "EUR", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + } + ], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + }, + "USD": { + "AUD": 2.0 + } + }, + "usepbsrates": false + } + } + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "958", + "bid": [{ + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }] + } + ], + "cur": "EUR" + } + } + }], + + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency.json b/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency.json new file mode 100644 index 0000000000..05a0016f45 --- /dev/null +++ b/adapters/aduptech/aduptechtest/exemplary/simple-banner-convert-currency.json @@ -0,0 +1,123 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "bidfloor": 1.0, + "bidfloorcur": "USD", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + }], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + } + }, + "usepbsrates": false + } + } + } + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com/rtb/bid", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [ + { + "id": "test-imp-id", + "bidfloor": 20, + "bidfloorcur": "EUR", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + } + ], + "ext": { + "prebid": { + "currency": { + "rates": { + "EUR": { + "USD": 0.05 + } + }, + "usepbsrates": false + } + } + } + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "958", + "bid": [{ + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }] + } + ], + "cur": "EUR" + } + } + }], + + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/aduptech/aduptechtest/exemplary/simple-banner-full-params.json b/adapters/aduptech/aduptechtest/exemplary/simple-banner-full-params.json new file mode 100644 index 0000000000..29a8c888c1 --- /dev/null +++ b/adapters/aduptech/aduptechtest/exemplary/simple-banner-full-params.json @@ -0,0 +1,107 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567", + "adtest": true, + "debug": true, + "query": "abc,def", + "ext": { + "foo": "bar" + } + } + } + }] + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com/rtb/bid", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567", + "adtest": true, + "debug": true, + "query": "abc,def", + "ext": { + "foo": "bar" + } + } + } + } + ] + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "958", + "bid": [{ + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }] + } + ], + "cur": "EUR" + } + } + }], + + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/aduptech/aduptechtest/exemplary/simple-banner.json b/adapters/aduptech/aduptechtest/exemplary/simple-banner.json new file mode 100644 index 0000000000..69c7655418 --- /dev/null +++ b/adapters/aduptech/aduptechtest/exemplary/simple-banner.json @@ -0,0 +1,95 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "banner": { + "format": [{ + "w": 300, + "h": 250 + }] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + }] + }, + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com/rtb/bid", + "body": { + "id": "test-request-id", + "site": { + "page": "https://good.site/url" + }, + "imp": [ + { + "id": "test-imp-id", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + } + ] + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "958", + "bid": [{ + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }] + } + ], + "cur": "EUR" + } + } + }], + + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adm": "some-test-ad", + "adomain": ["example.com"], + "crid": "29681110", + "h": 250, + "w": 300, + "mtype": 1 + }, + "type": "banner" + }] + }] +} diff --git a/adapters/aduptech/aduptechtest/exemplary/simple-native.json b/adapters/aduptech/aduptechtest/exemplary/simple-native.json new file mode 100644 index 0000000000..2c1086897f --- /dev/null +++ b/adapters/aduptech/aduptechtest/exemplary/simple-native.json @@ -0,0 +1,118 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "site": { + "id": "123", + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "native": { + "ver": "1.2", + "request": "{\"context\":2,\"contextsubtype\":20,\"plcmttype\":4,\"plcmtcnt\":1,\"urlsupport\":0,\"privacy\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]},{\"event\":2,\"methods\":[1]}],\"assets\":[{\"id\":123,\"required\":1,\"title\":{\"len\":140}},{\"id\":128,\"required\":0,\"img\":{\"wmin\":300,\"hmin\":250,\"type\":3}},{\"id\":129,\"required\":0,\"img\":{\"type\":2}},{\"id\":127,\"required\":1,\"data\":{\"type\":2,\"len\":140}}]}" + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + }] + }, + + "httpCalls": [{ + "expectedRequest": { + "uri": "https://example.com/rtb/bid", + "body": { + "id": "test-request-id", + "site": { + "id": "123", + "page": "https://good.site/url" + }, + "imp": [{ + "id": "test-imp-id", + "native": { + "ver": "1.2", + "request": "{\"context\":2,\"contextsubtype\":20,\"plcmttype\":4,\"plcmtcnt\":1,\"urlsupport\":0,\"privacy\":1,\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]},{\"event\":2,\"methods\":[1]}],\"assets\":[{\"id\":123,\"required\":1,\"title\":{\"len\":140}},{\"id\":128,\"required\":0,\"img\":{\"wmin\":300,\"hmin\":250,\"type\":3}},{\"id\":129,\"required\":0,\"img\":{\"type\":2}},{\"id\":127,\"required\":1,\"data\":{\"type\":2,\"len\":140}}]}" + }, + "ext": { + "bidder": { + "publisher": "123456", + "placement": "234567" + } + } + }] + }, + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [{ + "seat": "grid", + "bid": [{ + "id": "some-id", + "impid": "test-imp-id", + "price": 0.010526, + "adm": "{\"native\":{\"ver\":\"1.2\",\"link\":{\"url\":\"some-url\"},\"assets\":[{\"title\":{\"text\":\"some title\"},\"id\":123},{\"img\":{\"url\":\"some-image\",\"w\":300,\"h\":250},\"id\":128},{\"data\":{\"value\":\"some-description\"},\"id\":127}],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"some-click-url\"}],\"privacy\":\"https://www.adup-tech.com/oba/\"}}", + "adomain": [ + "example.com" + ], + "crid": "12345678", + "mtype": 4, + "ext": { + "dsa": { + "adrender": 0, + "behalf": "example.com", + "paid": "Example Site", + "transparency": [ + { + "domain": "adup-tech.com", + "params": [ + 2 + ] + } + ] + } + } + }] + }], + "currency": "EUR" + } + } + }], + + "expectedBidResponses": [{ + "currency": "EUR", + "bids": [{ + "bid": { + "id": "some-id", + "impid": "test-imp-id", + "price": 0.010526, + "adm": "{\"native\":{\"ver\":\"1.2\",\"link\":{\"url\":\"some-url\"},\"assets\":[{\"title\":{\"text\":\"some title\"},\"id\":123},{\"img\":{\"url\":\"some-image\",\"w\":300,\"h\":250},\"id\":128},{\"data\":{\"value\":\"some-description\"},\"id\":127}],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"some-click-url\"}],\"privacy\":\"https://www.adup-tech.com/oba/\"}}", + "adomain": [ + "example.com" + ], + "crid": "12345678", + "mtype": 4, + "ext": { + "dsa": { + "adrender": 0, + "behalf": "example.com", + "paid": "Example Site", + "transparency": [ + { + "domain": "adup-tech.com", + "params": [ + 2 + ] + } + ] + } + } + }, + "type": "native" + }] + }] +} diff --git a/adapters/aduptech/params_test.go b/adapters/aduptech/params_test.go new file mode 100644 index 0000000000..7bd24625b4 --- /dev/null +++ b/adapters/aduptech/params_test.go @@ -0,0 +1,63 @@ +package aduptech + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" +) + +var validParams = []string{ + `{ "publisher": "123456789", "placement": "234567890" }`, + `{ "publisher": "123456789", "placement": "234567890", "query": "test" }`, + `{ "publisher": "123456789", "placement": "234567890", "adtest": true }`, + `{ "publisher": "123456789", "placement": "234567890", "debug": true }`, + `{ "publisher": "123456789", "placement": "234567890", "query": "test", "adtest": true }`, + `{ "publisher": "123456789", "placement": "234567890", "ext": {"foo": "bar"} }`, + `{ "publisher": "123456789", "placement": "234567890", "ext": {} }`, +} + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, validParam := range validParams { + if err := validator.Validate(openrtb_ext.BidderAdUpTech, json.RawMessage(validParam)); err != nil { + t.Errorf("Schema rejected Aduptech params: %s", validParam) + } + } +} + +var invalidParams = []string{ + ``, + `null`, + `true`, + `5`, + `4.2`, + `[]`, + `{}`, + `{ "publisher": "123456789" }`, + `{ "placement": "234567890" }`, + `{ "publisher": null, "placement": null }`, + `{ "publisher": "123456789", "placement": "234567890", "query": null }`, + `{ "publisher": "123456789", "placement": "234567890", "adtest": null }`, + `{ "publisher": "123456789", "placement": "234567890", "debug": null }`, + `{ "publisher": "123456789", "placement": "234567890", "ext": null }`, + `{ "publisher": "123456789", "placement": "234567890", "ext": 123 }`, + `{ "publisher": "123456789", "placement": "234567890", "ext": "abc" }`, +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + if err != nil { + t.Fatalf("Failed to fetch the json-schemas. %v", err) + } + + for _, invalidParam := range invalidParams { + if err := validator.Validate(openrtb_ext.BidderAdUpTech, json.RawMessage(invalidParam)); err == nil { + t.Errorf("Schema allowed unexpected params: %s", invalidParam) + } + } +} diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 97a03dde2a..71169163d4 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -28,6 +28,7 @@ import ( "github.com/prebid/prebid-server/v3/adapters/adtelligent" "github.com/prebid/prebid-server/v3/adapters/adtonos" "github.com/prebid/prebid-server/v3/adapters/adtrgtme" + "github.com/prebid/prebid-server/v3/adapters/aduptech" "github.com/prebid/prebid-server/v3/adapters/advangelists" "github.com/prebid/prebid-server/v3/adapters/adview" "github.com/prebid/prebid-server/v3/adapters/adxcg" @@ -258,6 +259,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAdtrgtme: adtrgtme.Builder, openrtb_ext.BidderAdtelligent: adtelligent.Builder, openrtb_ext.BidderAdTonos: adtonos.Builder, + openrtb_ext.BidderAdUpTech: aduptech.Builder, openrtb_ext.BidderAdvangelists: advangelists.Builder, openrtb_ext.BidderAdView: adview.Builder, openrtb_ext.BidderAdxcg: adxcg.Builder, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 9e86ad86ec..166d44b893 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -44,6 +44,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderAdtrgtme, BidderAdtelligent, BidderAdTonos, + BidderAdUpTech, BidderAdvangelists, BidderAdView, BidderAdxcg, @@ -374,6 +375,7 @@ const ( BidderAdtrgtme BidderName = "adtrgtme" BidderAdTonos BidderName = "adtonos" BidderAdtelligent BidderName = "adtelligent" + BidderAdUpTech BidderName = "aduptech" BidderAdvangelists BidderName = "advangelists" BidderAdView BidderName = "adview" BidderAdxcg BidderName = "adxcg" diff --git a/openrtb_ext/imp_aduptech.go b/openrtb_ext/imp_aduptech.go new file mode 100644 index 0000000000..184d33ca45 --- /dev/null +++ b/openrtb_ext/imp_aduptech.go @@ -0,0 +1,11 @@ +package openrtb_ext + +import "encoding/json" + +type ExtImpAduptech struct { + Publisher string `json:"publisher"` + Placement string `json:"placement"` + Query string `json:"query"` + AdTest string `json:"adtest"` + Ext json.RawMessage `json:"ext,omitempty"` +} diff --git a/static/bidder-info/aduptech.yaml b/static/bidder-info/aduptech.yaml new file mode 100644 index 0000000000..a20ad698b3 --- /dev/null +++ b/static/bidder-info/aduptech.yaml @@ -0,0 +1,26 @@ +endpoint: "https://rtb.d.adup-tech.com/rtb/bid" +geoscope: + - EEA + - CHE + - GBR +maintainer: + email: "support@adup-tech.com" +gvlVendorID: 647 +openrtb: + version: 2.6 +capabilities: + app: + mediaTypes: + - banner + - native + site: + mediaTypes: + - banner + - native +userSync: + redirect: + url: "https://rtb.adup-tech.com/service/usersync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}" + userMacro: "[UID]" + iframe: + url: "https://rtb.adup-tech.com/service/usersync?iframe=1&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}" + userMacro: "[UID]" \ No newline at end of file diff --git a/static/bidder-params/aduptech.json b/static/bidder-params/aduptech.json new file mode 100644 index 0000000000..512b634a36 --- /dev/null +++ b/static/bidder-params/aduptech.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "AdUp Tech adapter params", + "description": "A schema which validates params accepted by the AdUp Tech adapter", + "type": "object", + + "properties": { + "publisher": { + "type": "string", + "description": "Unique publisher identifier." + }, + "placement": { + "type": "string", + "description": "Unique placement identifier per publisher." + }, + "query": { + "type": "string", + "description": "Semicolon separated list of keywords." + }, + "adtest": { + "type": "boolean", + "description": "Deactivates tracking of impressions and clicks. **Should only be used for testing purposes!**" + }, + "debug": { + "type": "boolean", + "description": "Enables debug mode. **Should only be used for testing purposes!**" + }, + "ext": { + "type": "object", + "description": "Additional parameters to be included in the request." + } + }, + + "required": ["publisher", "placement"] + } \ No newline at end of file