Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-saurabh-narkhede committed Nov 3, 2023
1 parent 9baf864 commit f95533c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions modules/pubmatic/openwrap/beforevalidationhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,15 +852,13 @@ func getPubID(bidRequest openrtb2.BidRequest) (pubID int, err error) {

func getTagID(imp openrtb2.Imp, impExt *models.ImpExtension) string {
//priority for tagId is imp.ext.gpid > imp.TagID > imp.ext.data.pbadslot
tagId := imp.TagID
if imp.TagID == "" {
tagId = impExt.Data.PbAdslot
}
if impExt.Gpid != "" {
tagId = impExt.Gpid
if idx := strings.Index(impExt.Gpid, "#"); idx != -1 {
tagId = impExt.Gpid[:idx]
return impExt.Gpid[:idx]
}
return impExt.Gpid
} else if imp.TagID != "" {
return imp.TagID
}
return tagId
return impExt.Data.PbAdslot
}

0 comments on commit f95533c

Please sign in to comment.