Skip to content
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

Flipp Bid Adapter: fix height parameter #11633

Merged
merged 23 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
900681f
Flipp Bid Adapter: initial release
mike-lei Feb 14, 2023
3e78053
OFF-372 Support DTX/Hero in flippBidAdapter (#2)
mike-lei Mar 15, 2023
302de4d
OFF-465 Add getUserKey logic to prebid.js adapter (#3)
mike-lei Apr 27, 2023
ba3de3c
OFF-500 Support "startCompact" param for Prebid.JS #4
mike-lei May 1, 2023
0e29c8c
set startCompact default value (#5)
mike-lei May 18, 2023
d0356c8
Merge branch 'prebid:master' into master
mike-lei May 25, 2023
3bcf657
Merge branch 'prebid:master' into master
mike-lei Aug 25, 2023
8030c65
fix docs
mike-lei Aug 30, 2023
d3e9b83
Merge branch 'master' of https://github.com/wishabi/Prebid.js
mike-lei Aug 30, 2023
b84ba5b
use client bidding endpoint
mike-lei Sep 8, 2023
ba5dc3e
update unit testing endpoint
mike-lei Sep 8, 2023
1801066
OFF-876 [Prebid Adapter] Check userKey for empty string (#6)
mike-lei Oct 18, 2023
8e5a9aa
merge latest
mike-lei Oct 18, 2023
5d18ac6
modify docs
mike-lei Oct 18, 2023
d872f1b
fix network id
mike-lei Nov 30, 2023
b0dc956
Merge remote-tracking branch 'upstream/master'
mike-lei Nov 30, 2023
d839521
use compactHeight and standardHeight in customData (#7)
mike-lei May 30, 2024
e6506e7
OFF-1455 [Prebid.js] height should use the compactHeight and standard…
mike-lei May 30, 2024
1f525b1
Merge branch 'master' of https://github.com/wishabi/Prebid.js
mike-lei May 30, 2024
a3dbd42
Update flippBidAdapter.js
mike-lei May 30, 2024
a5675b4
use compactHeight and standardHeight in customData (#7)
mike-lei May 30, 2024
c5b9b34
update docs
mike-lei May 30, 2024
f657c07
fix unit test
mike-lei May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion modules/flippBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const DEFAULT_CREATIVE_TYPE = 'NativeX';
const VALID_CREATIVE_TYPES = ['DTX', 'NativeX'];
const FLIPP_USER_KEY = 'flipp-uid';
const COMPACT_DEFAULT_HEIGHT = 600;
const STANDARD_DEFAULT_HEIGHT = 1800;

let userKey = null;
export const storage = getStorageManager({bidderCode: BIDDER_CODE});
Expand Down Expand Up @@ -166,7 +167,10 @@ export const spec = {
if (!isEmpty(res) && !isEmpty(res.decisions) && !isEmpty(res.decisions.inline)) {
return res.decisions.inline.map(decision => {
const placement = placements.find(p => p.prebid.requestId === decision.prebid?.requestId);
const height = placement.options?.startCompact ? COMPACT_DEFAULT_HEIGHT : decision.height;
const customData = decision.contents[0]?.data?.customData;
const height = placement.options?.startCompact
? customData?.compactHeight ?? COMPACT_DEFAULT_HEIGHT
: customData?.standardHeight ?? STANDARD_DEFAULT_HEIGHT;
return {
bidderCode: BIDDER_CODE,
requestId: decision.prebid?.requestId,
Expand Down
10 changes: 9 additions & 1 deletion test/spec/modules/flippBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ describe('flippAdapter', function () {
'requestId': '237f4d1a293f99',
'cpm': 1.11,
'creative': 'Returned from server',
},
'contents': {
'data': {
'customData': {
'compactHeight': 600,
'standardHeight': 1800
}
}
}
}]
},
Expand All @@ -114,7 +122,7 @@ describe('flippAdapter', function () {
cpm: 1.11,
netRevenue: true,
width: 300,
height: 600,
height: 1800,
creativeId: 262838368,
ttl: 30,
ad: 'Returned from server',
Expand Down