Skip to content

Commit

Permalink
Merge pull request #881 from PubMatic-OpenWrap/ci
Browse files Browse the repository at this point in the history
Release 27th August 2024
  • Loading branch information
pm-viral-vala authored Aug 22, 2024
2 parents 3feba61 + 3dc74a8 commit 7bddc97
Show file tree
Hide file tree
Showing 22 changed files with 822 additions and 282 deletions.
5 changes: 5 additions & 0 deletions adapters/pubmatic/pubmatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const (
AdServerGAM = "gam"
gpIdKey = "gpid"
pmZoneIDRequestParamName = "pmzoneid"
sendBurlKey = "sendburl"
)

func (a *PubmaticAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) {
Expand Down Expand Up @@ -450,6 +451,10 @@ func parseImpressionObject(imp *openrtb2.Imp, extractWrapperExtFromImp, extractP
extMap[pmZoneIDKeyName] = pubmaticExt.PmZoneID
}

if pubmaticExt.SendBurl {
extMap[sendBurlKey] = pubmaticExt.SendBurl
}

if bidderExt.SKAdnetwork != nil {
extMap[skAdnetworkKey] = bidderExt.SKAdnetwork
}
Expand Down
10 changes: 10 additions & 0 deletions adapters/pubmatic/pubmatic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ func TestParseImpressionObject(t *testing.T) {
},
expectedImpExt: json.RawMessage(`{"bidViewability":{"adSizes":{"728x90":{"createdAt":1679993940011,"rendered":20,"totalViewTime":424413,"viewed":17}},"adUnit":{"createdAt":1679993940011,"rendered":25,"totalViewTime":424413,"viewed":17}}}`),
},
{
name: "sendburl set in imp.ext.prebid.pubmatic, pass to imp.ext",
args: args{
imp: &openrtb2.Imp{
Video: &openrtb2.Video{},
Ext: json.RawMessage(`{"bidder":{"sendburl":true}}`),
},
},
expectedImpExt: json.RawMessage(`{"sendburl":true}`),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
7 changes: 0 additions & 7 deletions modules/pubmatic/openwrap/auctionresponsehook.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,6 @@ func (m OpenWrap) handleAuctionResponseHook(
responseExt.OwSendAllBids = 1
}

if rctx.LogInfoFlag == 1 {
responseExt.OwLogInfo = &openrtb_ext.OwLogInfo{
// Logger: openwrap.GetLogAuctionObjectAsURL(ao, true, true), updated done later
Tracker: tracker.GetTrackerInfo(rctx, responseExt),
}
}

result.SeatNonBid = prepareSeatNonBids(rctx)

if rctx.Debug {
Expand Down
9 changes: 3 additions & 6 deletions modules/pubmatic/openwrap/auctionresponsehook_test.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions modules/pubmatic/openwrap/beforevalidationhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ func (m *OpenWrap) applyProfileChanges(rctx models.RequestCtx, bidRequest *openr
if bidRequest.User.CustomData == "" && rctx.KADUSERCookie != nil {
bidRequest.User.CustomData = rctx.KADUSERCookie.Value
}
ctv.UpdateUserEidsWithValidValues(bidRequest.User)

for i := 0; i < len(bidRequest.WLang); i++ {
bidRequest.WLang[i] = getValidLanguage(bidRequest.WLang[i])
}
Expand Down
Loading

0 comments on commit 7bddc97

Please sign in to comment.