From a788661f45ac5399cc33f656cfca7a3f1ee8d107 Mon Sep 17 00:00:00 2001
From: MartinGumGum <109325501+MartinGumGum@users.noreply.github.com>
Date: Mon, 4 Nov 2024 11:14:07 -0800
Subject: [PATCH 1/3] GumGum: Override the default currency (#3928)
---
adapters/gumgum/gumgum.go | 4 +-
.../supplemental/convert-currency.json | 111 ++++++++++++++++++
2 files changed, 114 insertions(+), 1 deletion(-)
create mode 100644 adapters/gumgum/gumgumtest/supplemental/convert-currency.json
diff --git a/adapters/gumgum/gumgum.go b/adapters/gumgum/gumgum.go
index f6ab415516c..68ca84c7ce1 100644
--- a/adapters/gumgum/gumgum.go
+++ b/adapters/gumgum/gumgum.go
@@ -122,7 +122,9 @@ func (g *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest
})
}
}
-
+ if bidResp.Cur != "" {
+ bidResponse.Currency = bidResp.Cur
+ }
return bidResponse, errs
}
diff --git a/adapters/gumgum/gumgumtest/supplemental/convert-currency.json b/adapters/gumgum/gumgumtest/supplemental/convert-currency.json
new file mode 100644
index 00000000000..6c5be286275
--- /dev/null
+++ b/adapters/gumgum/gumgumtest/supplemental/convert-currency.json
@@ -0,0 +1,111 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ },
+ {
+ "w": 300,
+ "h": 300
+ }
+ ],
+ "w": 300,
+ "h": 250
+ },
+ "ext": {
+ "bidder": {
+ "pubId": 12345678
+ }
+ }
+ }
+ ],
+ "site": {
+ "publisher": {
+ "id": "12345678"
+ }
+ }
+ },
+
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "https://g2.gumgum.com/providers/prbds2s/bid",
+ "body":{
+ "id": "test-request-id",
+ "imp": [{
+ "id": "test-imp-id",
+ "banner": {
+ "format": [{
+ "w": 300,
+ "h": 250
+ }, {
+ "w": 300,
+ "h": 300
+ }],
+ "w": 300,
+ "h": 250
+ },
+ "ext": {
+ "bidder": {
+ "pubId": 12345678
+ }
+ }
+ }],
+ "site": {
+ "publisher": {
+ "id": "12345678"
+ }
+ }
+ },
+ "impIDs":["test-imp-id"]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "cur": "EUR",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "crid": "2068416",
+ "adm": "some-test-ad",
+ "adid": "2068416",
+ "price": 5,
+ "id": "5736a50b-6b05-42a8-aa6d-b0a4649dcd05",
+ "impid": "test-imp-id",
+ "cid": "4747"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ],
+
+ "expectedBidResponses": [
+ {
+ "currency": "EUR",
+ "bids": [
+ {
+ "bid": {
+ "crid": "2068416",
+ "adm": "some-test-ad",
+ "adid": "2068416",
+ "price": 5,
+ "id": "5736a50b-6b05-42a8-aa6d-b0a4649dcd05",
+ "impid": "test-imp-id",
+ "cid": "4747"
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
From 34035447654e1a91ba11095c25c9d67cb51200d7 Mon Sep 17 00:00:00 2001
From: PGAMSSP <142323401+PGAMSSP@users.noreply.github.com>
Date: Mon, 4 Nov 2024 23:30:59 +0200
Subject: [PATCH 2/3] PgamSSP: Add currency converter (#3907)
---
adapters/pgamssp/pgamssp.go | 12 ++
.../exemplary/convert_currency.json | 154 ++++++++++++++++++
2 files changed, 166 insertions(+)
create mode 100644 adapters/pgamssp/pgamssptest/exemplary/convert_currency.json
diff --git a/adapters/pgamssp/pgamssp.go b/adapters/pgamssp/pgamssp.go
index 1b96edd5597..6ddf21159e0 100644
--- a/adapters/pgamssp/pgamssp.go
+++ b/adapters/pgamssp/pgamssp.go
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"net/http"
+ "strings"
"github.com/prebid/openrtb/v20/openrtb2"
"github.com/prebid/prebid-server/v3/adapters"
@@ -39,6 +40,17 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E
reqCopy := *request
for _, imp := range request.Imp {
+
+ // Check if imp comes with bid floor amount defined in a foreign currency
+ if imp.BidFloor > 0 && imp.BidFloorCur != "" && strings.ToUpper(imp.BidFloorCur) != "USD" {
+ // Convert to US dollars
+ convertedValue, err := reqInfo.ConvertCurrency(imp.BidFloor, imp.BidFloorCur, "USD")
+ if err == nil {
+ imp.BidFloorCur = "USD"
+ imp.BidFloor = convertedValue
+ }
+ }
+
reqCopy.Imp = []openrtb2.Imp{imp}
var bidderExt adapters.ExtImpBidder
diff --git a/adapters/pgamssp/pgamssptest/exemplary/convert_currency.json b/adapters/pgamssp/pgamssptest/exemplary/convert_currency.json
new file mode 100644
index 00000000000..bdb2027714b
--- /dev/null
+++ b/adapters/pgamssp/pgamssptest/exemplary/convert_currency.json
@@ -0,0 +1,154 @@
+{
+ "mockBidRequest": {
+ "id": "test-request-id",
+ "device": {
+ "ip": "123.123.123.123",
+ "ua": "iPad"
+ },
+ "app": {
+ "id": "1",
+ "bundle": "com.wls.testwlsapplication"
+ },
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "tagid": "test",
+ "bidfloor": 1,
+ "bidfloorcur": "GBP",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ },
+ {
+ "w": 300,
+ "h": 600
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "placementId": "test"
+ }
+ }
+ }
+ ],
+ "ext": {
+ "prebid": {
+ "currency": {
+ "rates": {
+ "GBP": {
+ "USD": 0.05
+ }
+ }
+ }
+ }
+ }
+ },
+ "httpCalls": [
+ {
+ "expectedRequest": {
+ "uri": "http://test.com/pserver",
+ "body": {
+ "id": "test-request-id",
+ "imp": [
+ {
+ "id": "test-imp-id",
+ "tagid": "test",
+ "bidfloor": 0.05,
+ "bidfloorcur": "USD",
+ "banner": {
+ "format": [
+ {
+ "w": 300,
+ "h": 250
+ },
+ {
+ "w": 300,
+ "h": 600
+ }
+ ]
+ },
+ "ext": {
+ "bidder": {
+ "placementId": "test",
+ "type": "publisher"
+ }
+ }
+ }
+ ],
+ "app": {
+ "id": "1",
+ "bundle": "com.wls.testwlsapplication"
+ },
+ "device": {
+ "ip": "123.123.123.123",
+ "ua": "iPad"
+ },
+ "ext": {
+ "prebid": {
+ "currency": {
+ "rates": {
+ "GBP": {
+ "USD": 0.05
+ }
+ }
+ }
+ }
+ }
+ },
+ "impIDs": [
+ "test-imp-id"
+ ]
+ },
+ "mockResponse": {
+ "status": 200,
+ "body": {
+ "id": "test-request-id",
+ "seatbid": [
+ {
+ "bid": [
+ {
+ "id": "test_bid_id",
+ "impid": "test-imp-id",
+ "price": 0.27543,
+ "adm": "",
+ "cid": "test_cid",
+ "crid": "test_crid",
+ "dealid": "test_dealid",
+ "w": 300,
+ "h": 250,
+ "mtype": 1
+ }
+ ],
+ "seat": "pgamssp"
+ }
+ ],
+ "cur": "USD"
+ }
+ }
+ }
+ ],
+ "expectedBidResponses": [
+ {
+ "bids": [
+ {
+ "bid": {
+ "id": "test_bid_id",
+ "impid": "test-imp-id",
+ "price": 0.27543,
+ "adm": "",
+ "cid": "test_cid",
+ "crid": "test_crid",
+ "dealid": "test_dealid",
+ "w": 300,
+ "h": 250,
+ "mtype": 1
+ },
+ "type": "banner"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
From 106f6e450a2f6ab3ce986299468b9f657f4a0826 Mon Sep 17 00:00:00 2001
From: IQZoneAdx <88879712+IQZoneAdx@users.noreply.github.com>
Date: Mon, 4 Nov 2024 23:54:00 +0200
Subject: [PATCH 3/3] IQzone: Add user sync (#3971)
---
static/bidder-info/iqzone.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/static/bidder-info/iqzone.yaml b/static/bidder-info/iqzone.yaml
index 620ea01e43c..1b6c0963ab0 100644
--- a/static/bidder-info/iqzone.yaml
+++ b/static/bidder-info/iqzone.yaml
@@ -13,4 +13,10 @@ capabilities:
- banner
- video
- native
-
+userSync:
+ redirect:
+ url: "https://cs.iqzone.com/pbserver?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&redir={{.RedirectURL}}"
+ userMacro: "[UID]"
+ iframe:
+ url: "https://cs.iqzone.com/pbserverIframe?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&ccpa={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&pbserverUrl={{.RedirectURL}}"
+ userMacro: "[UID]"
\ No newline at end of file