diff --git a/adapters/triplelift/triplelift_test.go b/adapters/triplelift/triplelift_test.go index 0c167509688..2d7ed04f51b 100644 --- a/adapters/triplelift/triplelift_test.go +++ b/adapters/triplelift/triplelift_test.go @@ -6,5 +6,5 @@ import ( ) func TestJsonSamples(t *testing.T) { - adapterstest.RunJSONBidderTest(t, "triplelifttest", NewTripleliftBidder(nil, "http://tlx.3lift.net/s2s/auction?supplier_id=19")) + adapterstest.RunJSONBidderTest(t, "triplelifttest", NewTripleliftBidder(nil, "http://tlx.3lift.net/s2s/auction?supplier_id=20")) } diff --git a/adapters/triplelift/triplelifttest/exemplary/optional-params.json b/adapters/triplelift/triplelifttest/exemplary/optional-params.json index 63b88c3a5fd..0851bc096d7 100644 --- a/adapters/triplelift/triplelifttest/exemplary/optional-params.json +++ b/adapters/triplelift/triplelifttest/exemplary/optional-params.json @@ -19,7 +19,7 @@ "ext": { "bidder": { "inventoryCode": "foo", - "floor" : 20 + "floor": 20 } } } @@ -28,7 +28,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", "body": { "id": "test-request-id", "imp": [ @@ -51,7 +51,7 @@ "ext": { "bidder": { "inventoryCode": "foo", - "floor" : 20 + "floor": 20 } } } @@ -63,4 +63,4 @@ } } ] -} +} \ No newline at end of file diff --git a/adapters/triplelift/triplelifttest/exemplary/simple-banner.json b/adapters/triplelift/triplelifttest/exemplary/simple-banner.json index e7f59a81582..ff680037a7e 100644 --- a/adapters/triplelift/triplelifttest/exemplary/simple-banner.json +++ b/adapters/triplelift/triplelifttest/exemplary/simple-banner.json @@ -18,7 +18,7 @@ }, "ext": { "bidder": { - "inventoryCode": "aa" + "inventoryCode": "aa" } } } @@ -27,7 +27,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", "body": { "id": "test-request-id", "imp": [ @@ -45,7 +45,7 @@ } ] }, - "tagid" : "aa", + "tagid": "aa", "ext": { "bidder": { "inventoryCode": "aa" @@ -79,7 +79,7 @@ "w": 300, "ext": { "triplelift_pb": { - "format" : 2 + "format": 2 } } } @@ -113,7 +113,7 @@ "h": 250, "ext": { "triplelift_pb": { - "format" : 2 + "format": 2 } } }, @@ -122,4 +122,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/adapters/triplelift/triplelifttest/exemplary/simple-video.json b/adapters/triplelift/triplelifttest/exemplary/simple-video.json index 5cf4296a815..185446bd243 100644 --- a/adapters/triplelift/triplelifttest/exemplary/simple-video.json +++ b/adapters/triplelift/triplelifttest/exemplary/simple-video.json @@ -1,114 +1,144 @@ { - "mockBidRequest": { - "id": "test-request-id", - "imp": [ - { - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "w": 940, - "h": 560 - }, - "ext": { - "bidder": { - "inventoryCode" : "aaw", - "floor" : 0.10 - } - } - } - ] - }, - - "httpCalls": [ - { - "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", - "body": { - "id": "test-request-id", - "imp": [ - { - "tagid" : "aaw", - "bidfloor" : 0.10, - "id": "test-imp-id", - "video": { - "mimes": ["video/mp4"], - "minduration": 15, - "maxduration": 30, - "protocols": [2, 3, 5, 6, 7, 8], - "w": 940, - "h": 560 - }, - "ext": { - "bidder": { - "inventoryCode": "aaw", - "floor" : 0.10 - } - } - } - ] - } - }, - "mockResponse": { - "status": 200, - "body": { - "id": "test-request-id", - "seatbid": [ - { - "seat": "958", - "bid": [{ - "id": "7706636740145184841", - "impid": "test-imp-id", - "price": 0.500000, - "adid": "29681110", - "adm": "some-test-ad", - "adomain": ["foo.com"], - "iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=19", - "cid": "958", - "crid": "29681110", - "h": 250, - "w": 300, - "cat": ["IAB9-1"], - "ext": {"triplelift_pb":{"format":11}} - }] - } - ], - "bidid": "5778926625248726496", - "cur": "USD" - } - } - } - ], - - "expectedBidResponses": [ - { - "currency": "USD", - "bids": [ - { - "bid": { - "id": "7706636740145184841", - "impid": "test-imp-id", - "price": 0.5, - "adm": "some-test-ad", - "adid": "29681110", - "adomain": ["foo.com"], - "iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=19", - "cid": "958", - "crid": "29681110", - "w": 300, - "h": 250, - "cat": ["IAB9-1"], - "ext": { - "triplelift_pb": { - "format": 11 - } - } - }, - "type": "video" - } - ] - } - ] - } + "mockBidRequest": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 15, + "maxduration": 30, + "protocols": [ + 2, + 3, + 5, + 6, + 7, + 8 + ], + "w": 940, + "h": 560 + }, + "ext": { + "bidder": { + "inventoryCode": "aaw", + "floor": 0.10 + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", + "body": { + "id": "test-request-id", + "imp": [ + { + "tagid": "aaw", + "bidfloor": 0.10, + "id": "test-imp-id", + "video": { + "mimes": [ + "video/mp4" + ], + "minduration": 15, + "maxduration": 30, + "protocols": [ + 2, + 3, + 5, + 6, + 7, + 8 + ], + "w": 940, + "h": 560 + }, + "ext": { + "bidder": { + "inventoryCode": "aaw", + "floor": 0.10 + } + } + } + ] + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "958", + "bid": [ + { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.500000, + "adid": "29681110", + "adm": "some-test-ad", + "adomain": [ + "foo.com" + ], + "iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=20", + "cid": "958", + "crid": "29681110", + "h": 250, + "w": 300, + "cat": [ + "IAB9-1" + ], + "ext": { + "triplelift_pb": { + "format": 11 + } + } + } + ] + } + ], + "bidid": "5778926625248726496", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "7706636740145184841", + "impid": "test-imp-id", + "price": 0.5, + "adm": "some-test-ad", + "adid": "29681110", + "adomain": [ + "foo.com" + ], + "iurl": "http://tlx.3lift.net/s2s/auction?supplier_id=20", + "cid": "958", + "crid": "29681110", + "w": 300, + "h": 250, + "cat": [ + "IAB9-1" + ], + "ext": { + "triplelift_pb": { + "format": 11 + } + } + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/triplelift/triplelifttest/supplemental/badresponseext.json b/adapters/triplelift/triplelifttest/supplemental/badresponseext.json index 7452f8b5477..324c05825c9 100644 --- a/adapters/triplelift/triplelifttest/supplemental/badresponseext.json +++ b/adapters/triplelift/triplelifttest/supplemental/badresponseext.json @@ -18,7 +18,7 @@ }, "ext": { "bidder": { - "inventoryCode": "aa" + "inventoryCode": "aa" } } } @@ -27,7 +27,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", "body": { "id": "test-request-id", "imp": [ @@ -45,7 +45,7 @@ } ] }, - "tagid" : "aa", + "tagid": "aa", "ext": { "bidder": { "inventoryCode": "aa" @@ -77,7 +77,7 @@ "crid": "29681110", "h": 250, "w": 300, - "ext": "aaa" + "ext": "aaa" } ] } @@ -91,8 +91,7 @@ "expectedBidResponses": [ { "currency": "USD", - "bids": [ - ] + "bids": [] } ], "expectedMakeBidsErrors": [ @@ -101,4 +100,4 @@ "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/triplelift/triplelifttest/supplemental/badstatuscode.json b/adapters/triplelift/triplelifttest/supplemental/badstatuscode.json index 6ce29b13077..15799616933 100644 --- a/adapters/triplelift/triplelifttest/supplemental/badstatuscode.json +++ b/adapters/triplelift/triplelifttest/supplemental/badstatuscode.json @@ -18,7 +18,7 @@ }, "ext": { "bidder": { - "inventoryCode": "aa" + "inventoryCode": "aa" } } } @@ -27,7 +27,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", "body": { "id": "test-request-id", "imp": [ @@ -45,7 +45,7 @@ } ] }, - "tagid" : "aa", + "tagid": "aa", "ext": { "bidder": { "inventoryCode": "aa" @@ -79,7 +79,7 @@ "w": 300, "ext": { "triplelift_pb": { - "format" : 2 + "format": 2 } } } @@ -92,12 +92,11 @@ } } ], - "expectedBidResponses": [ - ], + "expectedBidResponses": [], "expectedMakeBidsErrors": [ { "value": "Unexpected status code: 400. Run with request.debug = 1 for more info", "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/triplelift/triplelifttest/supplemental/notgoodstatuscode.json b/adapters/triplelift/triplelifttest/supplemental/notgoodstatuscode.json index c97152ae77c..963db593776 100644 --- a/adapters/triplelift/triplelifttest/supplemental/notgoodstatuscode.json +++ b/adapters/triplelift/triplelifttest/supplemental/notgoodstatuscode.json @@ -18,7 +18,7 @@ }, "ext": { "bidder": { - "inventoryCode": "aa" + "inventoryCode": "aa" } } } @@ -27,7 +27,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=19", + "uri": "http://tlx.3lift.net/s2s/auction?supplier_id=20", "body": { "id": "test-request-id", "imp": [ @@ -45,7 +45,7 @@ } ] }, - "tagid" : "aa", + "tagid": "aa", "ext": { "bidder": { "inventoryCode": "aa" @@ -79,7 +79,7 @@ "w": 300, "ext": { "triplelift_pb": { - "format" : 2 + "format": 2 } } } @@ -92,12 +92,11 @@ } } ], - "expectedBidResponses": [ - ], + "expectedBidResponses": [], "expectedMakeBidsErrors": [ { "value": "Unexpected status code: 302. Run with request.debug = 1 for more info", "comparison": "literal" } ] -} +} \ No newline at end of file diff --git a/adapters/triplelift/usersync_test.go b/adapters/triplelift/usersync_test.go index 3406ec2a74b..3fe2418b2dc 100644 --- a/adapters/triplelift/usersync_test.go +++ b/adapters/triplelift/usersync_test.go @@ -8,11 +8,11 @@ import ( ) func TestTripleliftSyncer(t *testing.T) { - temp := template.Must(template.New("sync-template").Parse("//eb2.3lift.com/sync?gdpr={{.GDPR}}&cmp_cs={{.GDPRConsent}}")) + temp := template.Must(template.New("sync-template").Parse("//eb2.3lift.com/getuid?gdpr={{.GDPR}}&cmp_cs={{.GDPRConsent}}&redir=https%3A%2F%2Feb2.3lift.com%2Fsetuid%3Fbidder%3Dtriplelift%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24UID")) syncer := NewTripleliftSyncer(temp) syncInfo, err := syncer.GetUsersyncInfo("", "") assert.NoError(t, err) - assert.Equal(t, "//eb2.3lift.com/sync?gdpr=&cmp_cs=", syncInfo.URL) + assert.Equal(t, "//eb2.3lift.com/getuid?gdpr=&cmp_cs=&redir=https%3A%2F%2Feb2.3lift.com%2Fsetuid%3Fbidder%3Dtriplelift%26gdpr%3D%26gdpr_consent%3D%26uid%3D%24UID", syncInfo.URL) assert.Equal(t, "redirect", syncInfo.Type) assert.EqualValues(t, 28, syncer.GDPRVendorID()) assert.Equal(t, false, syncInfo.SupportCORS) diff --git a/config/config.go b/config/config.go index 7a5a72e9df0..996cddb1f8e 100644 --- a/config/config.go +++ b/config/config.go @@ -504,7 +504,7 @@ func (cfg *Configuration) setDerivedDefaults() { setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderYieldmo, "https://ads.yieldmo.com/pbsync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&redirectUri="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dyieldmo%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24UID") setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGamoshi, "https://rtb.gamoshi.io/pix/0000/scm?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgamoshi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%5Bgusr%5D") setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderMgid, "https://cm.mgid.com/m?cdsp=363893&adu="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dmgid%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7Bmuidn%7D") - setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderTriplelift, "https://eb2.3lift.com/sync?gpdr={{.GDPR}}&cmp_cs={{.GDPRConsent}}") + setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderTriplelift, "https://eb2.3lift.com/getuid?gpdr={{.GDPR}}&cmp_cs={{.GDPRConsent}}&redir="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dtriplelift%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24UID") setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderUnruly, "https://usermatch.targeting.unrulymedia.com/pbsync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dunruly%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24UID") setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderVisx, "https://t.visx.net/s2s_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&redir="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dvisx%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24%7BUUID%7D") setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderEngageBDR, "https://match.bnmla.com/usersync/s2s_sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dvisx%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24%7BUUID%7D") @@ -668,7 +668,7 @@ func SetupViper(v *viper.Viper, filename string) { v.SetDefault("adapters.somoaudience.endpoint", "http://publisher-east.mobileadtrading.com/rtb/bid") v.SetDefault("adapters.sovrn.endpoint", "http://ap.lijit.com/rtb/bid?src=prebid_server") v.SetDefault("adapters.synacormedia.endpoint", "http://{{.Host}}.technoratimedia.com/openrtb/bids/{{.Host}}") - v.SetDefault("adapters.triplelift.endpoint", "https://tlx.3lift.com/s2s/auction?supplier_id=19") + v.SetDefault("adapters.triplelift.endpoint", "https://tlx.3lift.com/s2s/auction?supplier_id=20") v.SetDefault("adapters.adkernel.endpoint", "http://{{.Host}}/hb?zone={{.ZoneID}}") v.SetDefault("adapters.adkerneladn.endpoint", "http://{{.Host}}/rtbpub?account={{.PublisherID}}") v.SetDefault("adapters.33across.partner_id", "")