-
Notifications
You must be signed in to change notification settings - Fork 0
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
EX-2549 Dealids custom param #26
Changes from 4 commits
64a1715
d8b8d28
21c5ac7
20a3c53
2b452a0
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 |
---|---|---|
|
@@ -30,6 +30,7 @@ export const spec = { | |
let eids; | ||
let tpid = [] | ||
let criteoId; | ||
let imp; | ||
|
||
utils._each(bidReqs, function (bid) { | ||
if (!eids && bid.userId) { | ||
|
@@ -53,7 +54,7 @@ export const spec = { | |
bidSizes = ((utils.isArray(bidSizes) && utils.isArray(bidSizes[0])) ? bidSizes : [bidSizes]) | ||
bidSizes = bidSizes.filter(size => utils.isArray(size)) | ||
const processedSizes = bidSizes.map(size => ({w: parseInt(size[0], 10), h: parseInt(size[1], 10)})) | ||
sovrnImps.push({ | ||
imp = { | ||
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. This should be a const 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. Done! |
||
adunitcode: bid.adUnitCode, | ||
id: bid.bidId, | ||
banner: { | ||
|
@@ -63,7 +64,17 @@ export const spec = { | |
}, | ||
tagid: String(utils.getBidIdParameter('tagid', bid.params)), | ||
bidfloor: utils.getBidIdParameter('bidfloor', bid.params) | ||
}); | ||
} | ||
|
||
sovrnImps.push(imp); | ||
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. it does not actually matter but I would prefer to see the push after the variable is complete. 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. Moved to the right place, thank you! |
||
|
||
const segmentsString = utils.getBidIdParameter('segments', bid.params) | ||
|
||
if (segmentsString) { | ||
imp.ext = { | ||
deals: segmentsString.split(',') | ||
} | ||
} | ||
}); | ||
|
||
const page = bidderRequest.refererInfo.referer | ||
|
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.
Imp is not used outside of the _each scope so it should be defined there.
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.
Done!