-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Update Adform adapter to Prebid v1.0 #1947
Conversation
# Conflicts: # modules/adformBidAdapter.js # test/spec/modules/adformBidAdapter_spec.js
_key = globalParams[j][0]; | ||
_value = bid[_key] || bid.params[_key]; | ||
if (_value) { | ||
bid[_key] = bid.params[_key] = null; |
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.
Why are you mutating the bids? Is there a way you can do this without mutating the original bid objects?
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.
Hi, changes were made to avoid mutating original bid objects.
modules/adformBidAdapter.js
Outdated
return encode64(url.join('').slice(0, -1)); | ||
} | ||
|
||
function encode64(input) { |
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.
is there a reason you are manually performing base64 encoding over using native btoa
?
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.
LGTM
return !!(bid.params.mid); | ||
}, | ||
buildRequests: function (validBidRequests) { | ||
var i, l, j, k, bid, _key, _value, reqParams; |
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.
nit: prefer const
| let
var request = []; | ||
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ] ]; | ||
var netRevenue = 'net'; | ||
var bids = JSON.parse(JSON.stringify(validBidRequests)); |
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.
we have a copy function in utils deepClone
that could be used. Although this is probably fine.
* test * update adform bid adapter * update unit tests * Added adform adapter description file * updated tests * Another tests update * add auctionId to adformBidAdapter * Final updates to fit 1.0 version * update docs and integration example * Do not mutate original validBidRequests * use atob and btoa instead of custom made module * Renaming one query string parameter
* 'master' of https://github.com/prebid/Prebid.js: (23 commits) Update Atomx adapter for Prebid v1.0 (prebid#2026) Add vi bid adapter (prebid#2020) Add eplanningBidAdapter (prebid#2003) OpenX Adapter: Update to support mediaTypes field, instead of the deprecated mediaType field (prebid#1974) Separate bids & won calls (prebid#2015) 1.0 adapter support for mantis (prebid#1840) Media.net adapter added (prebid#2038) GumGum Adapter for Prebid.js 1.0 (prebid#1966) Serverbid Bid Adapter: updated docs and ad sizes (prebid#2023) Adding districtm as an alias (prebid#2018) Use sudo to workaround Travis regression (prebid#2041) Fix uncached video bids triggering callback early (prebid#2017) Re-implemented RhythmOne audit beacon in prebid 1.0 interface (prebid#1953) Add NasmediaAdmixer adapter for Perbid.js 1.0 (prebid#1937) Update Adform adapter to Prebid v1.0 (prebid#1947) Upgrade Admixer adapter for Prebid 1.0 (prebid#1755) multiformat size validation checks (prebid#1964) Gjirafa Bidder Adapter (prebid#1944) pin gulp-connect at non-broken version (prebid#2008) Added dynamic ttl property for One Display and One Mobile. (prebid#2004) ...
Added the needs-docs label since it's not showing up on http://prebid.org/download.html in the 1.2.0 dropdown due to lack of the page having the "prebid 1.0 support" key in the page's YAML header. Let me know if there is another better way to do this. |
* test * update adform bid adapter * update unit tests * Added adform adapter description file * updated tests * Another tests update * add auctionId to adformBidAdapter * Final updates to fit 1.0 version * update docs and integration example * Do not mutate original validBidRequests * use atob and btoa instead of custom made module * Renaming one query string parameter
Type of change
Description of change
Update Adform adapter to Prebid v1.0
Scope.FL.Scripts@adform.com