Skip to content

Commit

Permalink
apply 1.5 for msp_nova && enable dynamic floor server cache for andro…
Browse files Browse the repository at this point in the history
…id huge multi-format placement (prebid#237)
  • Loading branch information
shunj-nb authored Feb 14, 2024
1 parent ee51dab commit 89b9987
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/adapters/google/adapter/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,14 @@ func (a *GoogleAdapter) MakeBids(bidReq *openrtb2.BidRequest, adapterReq *adapte
if bidReq.Imp[0].Native != nil {
bidType = openrtb_ext.BidTypeNative
} else if bidReq.Imp[0].Banner != nil {
width = *bidReq.Imp[0].Banner.W
height = *bidReq.Imp[0].Banner.H
wp := bidReq.Imp[0].Banner.W
hp := bidReq.Imp[0].Banner.H
if wp != nil {
width = *wp
}
if hp != nil {
height = *hp
}
bidType = openrtb_ext.BidTypeBanner
} else {
return nil, nil
Expand Down
1 change: 1 addition & 0 deletions pkg/modules/ad_cache/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
var dynamic_floor_experiment_placements = []string{
"msp-android-foryou-large-display-exp2",
"msp-android-article-inside-display-exp2",
"msp-android-article-huge-display-exp",
}

func GetBidderConfig(config *AdCacheBiddersConfig, bidder string, placement string) (BidderConfig, bool) {
Expand Down
6 changes: 6 additions & 0 deletions pkg/modules/update_bundle/module/hook_raw_bidder_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func handleRawBidderResponsesHook(
bid.Bid.Price = bid.Bid.Price * 5.0
}
}
} else if placementId == "msp-android-article-huge-display-exp" {
if payload.Bidder == "msp_nova" {
for _, bid := range payload.Bids {
bid.Bid.Price = bid.Bid.Price * 1.5
}
}
}

return result, nil
Expand Down

0 comments on commit 89b9987

Please sign in to comment.