Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pubmatic-Supriya-Patil committed Oct 23, 2024
1 parent f5c08b9 commit 4cbe22c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/pubmatic/openwrap/applovinmax.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func updateUser(signalUser *openrtb2.User, maxRequest *openrtb2.BidRequest) {

maxRequest.User.Data = signalUser.Data

//Pass user.ext.sessionduration and user.ext.impdepth to ow partners in case of ALMAX integration
keys := []string{"sessionduration", "impdepth"}

for _, key := range keys {
Expand All @@ -203,6 +204,7 @@ func updateUser(signalUser *openrtb2.User, maxRequest *openrtb2.BidRequest) {
maxRequest.User.Ext, _ = jsonparser.Set(maxRequest.User.Ext, field, key)
}
} else {
// Don’t pass sessionduration and impdepth parameter if present in the request
maxRequest.User.Ext = jsonparser.Delete(maxRequest.User.Ext, key)
}
}
Expand Down

0 comments on commit 4cbe22c

Please sign in to comment.