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

Dynamic priceType at adform adapter #2384

Merged
merged 66 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
10edde0
bid response adId same as bidId
braizhas Jan 24, 2017
8596825
Merge branch 'upmaster'
braizhas May 2, 2017
11d1404
Merge pull request #10 from prebid/master
Pupis Jun 13, 2017
3aa3b53
test
Nov 8, 2017
84f662c
update adform bid adapter
Nov 8, 2017
a6dbc4a
update unit tests
Nov 8, 2017
2f74c76
Added adform adapter description file
Nov 8, 2017
0fc8d12
updated tests
Nov 8, 2017
f6a51be
Another tests update
Nov 8, 2017
25299b8
Add auctionId
Nov 27, 2017
6891ecd
Update adapter for auctionId
Nov 27, 2017
3551b0c
Merge commit '02d2d4cd236d22fe469cbaff868b49e192ec2ab6' into temp-merge
Nov 28, 2017
5350442
Merge branch 'adform-auctionId' of https://github.com/adform/Prebid.j…
Nov 28, 2017
a7b9408
add auctionId to adformBidAdapter
Nov 28, 2017
dfa383b
Merge commit 'ef4ffdb590c6d673b8c3c3ceb76f756e52c41c31'
Dec 4, 2017
11c7924
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 8, 2017
29e7931
Final updates to fit 1.0 version
Dec 11, 2017
648ed8a
Merge branch 'adform-adapter-update' into origin master
Dec 11, 2017
138f956
update docs and integration example
Dec 11, 2017
8df70f0
Do not mutate original validBidRequests
Dec 14, 2017
4e6a0ee
use atob and btoa instead of custom made module
Dec 14, 2017
2879bd4
Renaming one query string parameter
Jan 3, 2018
bdc19fd
XDomainRequest.send exception fix (#1942)
ckbo3hrk Dec 11, 2017
0b39bd7
Added YIELDONE Bid Adapter for Prebid.js 1.0 (#1900)
Dec 12, 2017
ef3a823
Add user-facing docs reminder to PR template (#1956)
rmloveland Dec 14, 2017
a17ebaf
allow non-mappable sizes to be passed and used in rubicon adapter (#1…
snapwich Dec 15, 2017
d13f7ce
Typo correction of YIELDONE md file (#1954)
Dec 19, 2017
a340bb1
Serverbid bid adapter: update alias config (#1963)
jgrimes Dec 19, 2017
8e15c0d
use auctionId instead of requestId (#1968)
jaiminpanchal27 Dec 19, 2017
3caf481
Add freewheel ssp bidder adapter for prebid 1.0 (#1793)
guillaume-sticky Dec 19, 2017
49668ec
+ fixed endpoint request data property names - width to w and height …
optimatic58 Dec 19, 2017
48aece8
Added iQM Bid Adapter for Prebid.js 1.0 (#1880)
pkthakkar26 Dec 19, 2017
8166a3b
Remove stray console.log (#1975)
matthewlane Dec 19, 2017
b038a30
Remove duplicate request id and fix empty response from getHighesCpmB…
jaiminpanchal27 Dec 19, 2017
b3e7489
[Add BidAdapter] rxrtb adapter for Perbid.js 1.0 (#1950)
prebidRxRTB Dec 19, 2017
f993ab0
ServerBid Server BidAdapter (#1819)
jcswart Dec 19, 2017
861b0be
added hb_source to default keys (#1969)
Dec 19, 2017
c99ae64
Prebid 1.1.0 Release
matthewlane Dec 20, 2017
f7d9415
Increment pre version
matthewlane Dec 20, 2017
38ca2c5
S2s defaults fix in serverbidServerBidAdapter (#1986)
jaiminpanchal27 Dec 20, 2017
b1f5745
remove hardcoded localhost port for tests (#1988)
snapwich Dec 20, 2017
8f6c6ad
Fixes unit tests in browsers other than chrome (#1987)
jaiminpanchal27 Dec 20, 2017
10f3a87
Prebid 1.1.1 Release
jaiminpanchal27 Dec 20, 2017
fbdd17f
Add note about docs needed before merge (#1959)
Jan 2, 2018
c414949
Adding optional width and height to display parameters (#1998)
nissSK Jan 3, 2018
dbbc00a
TrustX adapter update (#1979)
PWyrembak Jan 3, 2018
20bc6b0
Serverbid Bid Adapter: Add new ad sizes (#1983)
jgrimes Jan 3, 2018
df346f7
Added dynamic ttl property for One Display and One Mobile. (#2004)
vzhukovsky Jan 4, 2018
15e5f5c
pin gulp-connect at non-broken version (#2008)
snapwich Jan 4, 2018
cf3bf61
Gjirafa Bidder Adapter (#1944)
agon-qurdina Jan 4, 2018
d4712be
multiformat size validation checks (#1964)
jsnellbaker Jan 5, 2018
955f399
Upgrade Admixer adapter for Prebid 1.0 (#1755)
Galphimbl Jan 8, 2018
033ed42
Add NasmediaAdmixer adapter for Perbid.js 1.0 (#1937)
NasmediaWebtech Jan 10, 2018
cf2a5ae
Merge branch 'upmaster'
Jan 10, 2018
fba153d
Merge branch 'upmaster'
Feb 1, 2018
4da6bb0
Merge branch 'upmaster'
Feb 5, 2018
5619531
Merge remote-tracking branch 'upstream/master'
Feb 7, 2018
9919197
Merge branch 'prebid/master'
braizhas Feb 21, 2018
efa4628
Merge branch 'upmaster'
Mar 9, 2018
a904c16
Merge branch 'upmaster'
Apr 9, 2018
5ca94b6
Merge branch 'upmaster'
Apr 10, 2018
6633327
Added price type global param, changed default value to gross.
Apr 12, 2018
1cf3678
Updated tests
Apr 12, 2018
aecf028
some console.logs
Apr 12, 2018
fcc3efd
Keep the same names
Apr 12, 2018
efcc303
Update description
Apr 12, 2018
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
8 changes: 4 additions & 4 deletions modules/adformBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const spec = {
buildRequests: function (validBidRequests) {
var i, l, j, k, bid, _key, _value, reqParams;
var request = [];
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ] ];
var netRevenue = 'net';
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ], [ 'pt', null ] ];
var netRevenue = 'gross';
var bids = JSON.parse(JSON.stringify(validBidRequests));
for (i = 0, l = bids.length; i < l; i++) {
bid = bids[i];
if (bid.params.priceType === 'gross') {
netRevenue = 'gross';
if (bid.params.priceType === 'net') {
bid.params.pt = netRevenue = 'net';
}
for (j = 0, k = globalParams.length; j < k; j++) {
_key = globalParams[j][0];
Expand Down
2 changes: 1 addition & 1 deletion modules/adformBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Banner and video formats are supported.
params: {
adxDomain: 'adx.adform.net', //optional
mid: '292063',
priceType: 'gross' // default is 'net'
priceType: 'net' // default is 'gross'
}
}
]
Expand Down
16 changes: 12 additions & 4 deletions test/spec/modules/adformBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ describe('Adform adapter', () => {
{
mid: '2',
someVar: 'someValue',
transactionId: '5f33781f-9552-4iuy',
priceType: 'gross'
transactionId: '5f33781f-9552-4iuy'
},
{
mid: '3',
Expand Down Expand Up @@ -166,12 +165,20 @@ describe('Adform adapter', () => {
assert.equal(result[i].mediaType, expected[i]);
}
});

it('should set default netRevenue as gross', () => {
bidRequest.netRevenue = 'gross';
const result = spec.interpretResponse(serverResponse, bidRequest);
for (let i = 0; i < result.length; i++) {
assert.equal(result[i].netRevenue, false);
}
});
});

beforeEach(() => {
let sizes = [[250, 300], [300, 250], [300, 600]];
let placementCode = ['div-01', 'div-02', 'div-03', 'div-04', 'div-05'];
let params = [{ mid: 1, url: 'some// there' }, {adxDomain: null, mid: 2, someVar: 'someValue', priceType: 'gross'}, { adxDomain: null, mid: 3, pdom: 'home' }];
let params = [{ mid: 1, url: 'some// there' }, {adxDomain: null, mid: 2, someVar: 'someValue', pt: 'gross'}, { adxDomain: null, mid: 3, pdom: 'home' }];
bids = [
{
adUnitCode: placementCode[0],
Expand Down Expand Up @@ -285,7 +292,8 @@ describe('Adform adapter', () => {
bidder: 'adform',
bids: bids,
method: 'GET',
url: 'url'
url: 'url',
netRevenue: 'net'
};
});
});
Expand Down