From d00d8bcae1fa180e72712a1c95eb6e1c84bb7620 Mon Sep 17 00:00:00 2001 From: Isha Bharti Date: Tue, 30 Nov 2021 02:58:20 +0530 Subject: [PATCH] New Adapter: Groupm (Alias Of PubMatic) (#2042) --- config/config.go | 1 + exchange/adapter_builders.go | 1 + openrtb_ext/bidders.go | 2 ++ static/bidder-info/groupm.yaml | 18 ++++++++++ static/bidder-params/groupm.json | 61 ++++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 static/bidder-info/groupm.yaml create mode 100644 static/bidder-params/groupm.json diff --git a/config/config.go b/config/config.go index 84ed6109047..41809aea97f 100644 --- a/config/config.go +++ b/config/config.go @@ -826,6 +826,7 @@ func SetupViper(v *viper.Viper, filename string) { v.SetDefault("adapters.gamma.endpoint", "https://hb.gammaplatform.com/adx/request/") v.SetDefault("adapters.gamoshi.endpoint", "https://rtb.gamoshi.io") v.SetDefault("adapters.grid.endpoint", "https://grid.bidswitch.net/sp_bid?sp=prebid") + v.SetDefault("adapters.groupm.endpoint", "https://hbopenbid.pubmatic.com/translator?source=prebid-server") v.SetDefault("adapters.gumgum.endpoint", "https://g2.gumgum.com/providers/prbds2s/bid") v.SetDefault("adapters.huaweiads.endpoint", "https://acd.op.hicloud.com/ppsadx/getResult") v.SetDefault("adapters.huaweiads.disabled", true) diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index 29faaca8ff4..5d99b7f3668 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -198,6 +198,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderGamma: gamma.Builder, openrtb_ext.BidderGamoshi: gamoshi.Builder, openrtb_ext.BidderGrid: grid.Builder, + openrtb_ext.BidderGroupm: pubmatic.Builder, openrtb_ext.BidderGumGum: gumgum.Builder, openrtb_ext.BidderHuaweiAds: huaweiads.Builder, openrtb_ext.BidderImpactify: impactify.Builder, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 770811a907e..e8b6ce4cfa5 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -135,6 +135,7 @@ const ( BidderGamma BidderName = "gamma" BidderGamoshi BidderName = "gamoshi" BidderGrid BidderName = "grid" + BidderGroupm BidderName = "groupm" BidderGumGum BidderName = "gumgum" BidderHuaweiAds BidderName = "huaweiads" BidderImpactify BidderName = "impactify" @@ -276,6 +277,7 @@ func CoreBidderNames() []BidderName { BidderGamma, BidderGamoshi, BidderGrid, + BidderGroupm, BidderGumGum, BidderHuaweiAds, BidderImpactify, diff --git a/static/bidder-info/groupm.yaml b/static/bidder-info/groupm.yaml new file mode 100644 index 00000000000..9e487ad50a8 --- /dev/null +++ b/static/bidder-info/groupm.yaml @@ -0,0 +1,18 @@ +maintainer: + email: "header-bidding@pubmatic.com" +gvlVendorID: 98 +capabilities: + app: + mediaTypes: + - banner + - video + site: + mediaTypes: + - banner + - video +userSync: + iframe: + url: "https://ads.pubmatic.com/AdServer/js/user_sync.html?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&predirect={{.RedirectURL}}" + userMacro: "" + # groupm appends the user id to end of the redirect url and does not utilize a macro + diff --git a/static/bidder-params/groupm.json b/static/bidder-params/groupm.json new file mode 100644 index 00000000000..cfebd2adb19 --- /dev/null +++ b/static/bidder-params/groupm.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Groupm Adapter Params", + "description": "A schema which validates params accepted by the Groupm adapter", + "type": "object", + "properties": { + "publisherId": { + "type": "string", + "description": "An ID which identifies the publisher" + }, + "adSlot": { + "type": "string", + "description": "An ID which identifies the ad slot" + }, + "pmzoneid": { + "type": "string", + "description": "Comma separated zone id. Used im deal targeting & site section targeting. e.g drama,sport" + }, + "dctr": { + "type": "string", + "description": "Deals Custom Targeting, pipe separated key-value pairs e.g key1=V1,V2,V3|key2=v1|key3=v3,v5" + }, + "wrapper": { + "type": "object", + "description": "Specifies Groupm openwrap configuration for a publisher", + "properties": { + "profile": { + "type": "integer", + "description": "An ID which identifies the openwrap profile of publisher" + }, + "version": { + "type": "integer", + "description": "An ID which identifies version of the openwrap profile" + } + }, + "required": ["profile"] + }, + "keywords": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "description": "A key with one or more values associated with it. These are used in buy-side segment targeting.", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": ["key", "value"] + } + } + }, + "required": ["publisherId"] +}