Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GumGum: Add product parameter #3253

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions adapters/gumgum/gumgum.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ func preprocess(imp *openrtb2.Imp) (*openrtb_ext.ExtImpGumGum, error) {
}
}

if gumgumExt.Product != "" {
var err error
//imp.Ext, err = json.Marshal(`{ "product": "%s" }`, gumgumExt.Product)
imp.Ext, err = json.Marshal(map[string]string{"product": gumgumExt.Product})
if err != nil {
return nil, err
}
}
gg-natalia marked this conversation as resolved.
Show resolved Hide resolved

return &gumgumExt, nil
}

Expand Down
1 change: 1 addition & 0 deletions adapters/gumgum/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var validParams = []string{
`{"pubId":12345678, "irisid": "iris_6f9285823a48bne5"}`,
`{"zone":"dc9d6be1", "irisid": "iris_6f9285823a48bne5"}`,
`{"zone":"dc9d6be1", "pubId":12345678, "irisid": "iris_6f9285823a48bne5"}`,
`{"zone":"dc9d6be1", "pubId":12345678, "irisid": "iris_6f9285823a48bne5", "product": "skins"}`,
}

var invalidParams = []string{
Expand Down
9 changes: 5 additions & 4 deletions openrtb_ext/imp_gumgum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package openrtb_ext
// ExtImpGumGum defines the contract for bidrequest.imp[i].ext.prebid.bidder.gumgum
// Either Zone or PubId must be present, others are optional parameters
type ExtImpGumGum struct {
Zone string `json:"zone,omitempty"`
PubID float64 `json:"pubId,omitempty"`
IrisID string `json:"irisid,omitempty"`
Slot float64 `json:"slot,omitempty"`
Zone string `json:"zone,omitempty"`
PubID float64 `json:"pubId,omitempty"`
IrisID string `json:"irisid,omitempty"`
Slot float64 `json:"slot,omitempty"`
Product string `json:"product,omitempty"`
}

// ExtImpGumGumVideo defines the contract for bidresponse.seatbid.bid[i].ext.prebid.bidder.gumgum.video
Expand Down
6 changes: 5 additions & 1 deletion static/bidder-params/gumgum.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"slot": {
"type": "integer",
"description": "A slot id used to identify a slot placement mapped to a GumGum zone or publisher"
},
"product": {
"type": "string",
"description": "Product param that allow support for Desktop Skins - display and video"
}
},
"anyOf": [
Expand All @@ -34,4 +38,4 @@
]
}
]
}
}
Loading