-
Notifications
You must be signed in to change notification settings - Fork 755
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
Video endpoint bid selection enhancements #1419
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"bidRequest": { | ||
"imp": [{ | ||
"id": "1_0" | ||
}, | ||
{ | ||
"id": "1_1" | ||
} | ||
] | ||
}, | ||
"pbsBids": [{ | ||
"bid": { | ||
"id": "apn_1_0", | ||
"impid": "1_0", | ||
"price": 12.00, | ||
"nurl": "http://apn_1_0.com", | ||
"cat": ["12.00_sports_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "appnexus" | ||
}, { | ||
"bid": { | ||
"id": "spotx_1_0", | ||
"impid": "1_0", | ||
"price": 20.00, | ||
"nurl": "http://spotx_1_0.com", | ||
"cat": ["20_news_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "spotx" | ||
}, { | ||
"bid": { | ||
"id": "apn_1_1", | ||
"impid": "1_1", | ||
"price": 18.00, | ||
"nurl": "http://apn_1_1.com", | ||
"cat": ["18_furniture_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "appnexus" | ||
}, { | ||
"bid": { | ||
"id": "spotx_1_1", | ||
"impid": "1_1", | ||
"price": 17.00, | ||
"nurl": "http://spotx_1_1.com", | ||
"cat": ["17_auto_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "spotx" | ||
}, { | ||
"bid": { | ||
"id": "rubicon_1_1", | ||
"impid": "1_1", | ||
"price": 17.50, | ||
"nurl": "http://rubicon_1_1.com", | ||
"cat": ["17_music_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "rubicon" | ||
}], | ||
"expectedCacheables": [{ | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://apn_1_0.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "12.00_sports_30s" | ||
}, { | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://spotx_1_0.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "20_news_30s" | ||
}, { | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://apn_1_1.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "18_furniture_30s" | ||
}, | ||
{ | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://spotx_1_1.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "17_auto_30s" | ||
}, | ||
{ | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://rubicon_1_1.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "17_music_30s" | ||
} | ||
], | ||
"defaultTTLs": { | ||
"banner": 300, | ||
"video": 3600, | ||
"audio": 1800, | ||
"native": 300 | ||
}, | ||
"targetDataIncludeWinners": true, | ||
"targetDataIncludeBidderKeys": true, | ||
"targetDataIncludeCacheBids": false, | ||
"targetDataIncludeCacheVast": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"bidRequest": { | ||
"imp": [{ | ||
"id": "1_0" | ||
}, | ||
{ | ||
"id": "1_1" | ||
} | ||
] | ||
}, | ||
"pbsBids": [{ | ||
"bid": { | ||
"id": "apn_1_0", | ||
"impid": "1_0", | ||
"price": 12.00, | ||
"nurl": "http://apn_1_0.com", | ||
"cat": ["12.00_sports_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "appnexus" | ||
}, { | ||
"bid": { | ||
"id": "spotx_1_0", | ||
"impid": "1_0", | ||
"price": 20.00, | ||
"nurl": "http://spotx_1_0.com", | ||
"cat": ["20_news_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "spotx" | ||
}, { | ||
"bid": { | ||
"id": "apn_1_1", | ||
"impid": "1_1", | ||
"price": 18.00, | ||
"nurl": "http://apn_1_1.com", | ||
"cat": ["18_furniture_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "appnexus" | ||
}, { | ||
"bid": { | ||
"id": "spotx_1_1", | ||
"impid": "1_1", | ||
"price": 17.00, | ||
"nurl": "http://spotx_1_1.com", | ||
"cat": ["17_auto_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "spotx" | ||
}, { | ||
"bid": { | ||
"id": "rubicon_1_1", | ||
"impid": "1_1", | ||
"price": 17.50, | ||
"nurl": "http://rubicon_1_1.com", | ||
"cat": ["17_music_30s"] | ||
}, | ||
"bidType": "video", | ||
"bidder": "rubicon" | ||
}], | ||
"expectedCacheables": [ | ||
{ | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://spotx_1_0.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "20_news_30s" | ||
}, | ||
{ | ||
"Type": "xml", | ||
"TTLSeconds": 3660, | ||
"Data": "\u003cVAST version=\"3.0\"\u003e\u003cAd\u003e\u003cWrapper\u003e\u003cAdSystem\u003eprebid.org wrapper\u003c/AdSystem\u003e\u003cVASTAdTagURI\u003e\u003c![CDATA[http://apn_1_1.com]]\u003e\u003c/VASTAdTagURI\u003e\u003cImpression\u003e\u003c/Impression\u003e\u003cCreatives\u003e\u003c/Creatives\u003e\u003c/Wrapper\u003e\u003c/Ad\u003e\u003c/VAST\u003e", | ||
"Key": "18_furniture_30s" | ||
} | ||
], | ||
"defaultTTLs": { | ||
"banner": 300, | ||
"video": 3600, | ||
"audio": 1800, | ||
"native": 300 | ||
}, | ||
"targetDataIncludeWinners": true, | ||
"targetDataIncludeBidderKeys": false, | ||
"targetDataIncludeCacheBids": false, | ||
"targetDataIncludeCacheVast": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import ( | |
"github.com/prebid/prebid-server/openrtb_ext" | ||
) | ||
|
||
const maxKeyLength = 20 | ||
const MaxKeyLength = 20 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want, you can make this a config option rather than being hardcoded. There has been some talk about making this configurable, but no one has gotten around to it yet. Not required in this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hhhjort I agree this should be a config option. Can we leave it for later, because this PR has first priority now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have a story for this internally. Not required for this PR. |
||
|
||
// targetData tracks information about the winning Bid in each Imp. | ||
// | ||
|
@@ -79,7 +79,7 @@ func (targData *targetData) setTargeting(auc *auction, isApp bool, categoryMappi | |
|
||
func (targData *targetData) addKeys(keys map[string]string, key openrtb_ext.TargetingKey, value string, bidderName openrtb_ext.BidderName, overallWinner bool) { | ||
if targData.includeBidderKeys { | ||
keys[key.BidderKey(bidderName, maxKeyLength)] = value | ||
keys[key.BidderKey(bidderName, MaxKeyLength)] = value | ||
} | ||
if targData.includeWinners && overallWinner { | ||
keys[string(key)] = value | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may not need
IncludeWinners
now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.