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

Latest #4

Merged
merged 41 commits into from
Dec 21, 2018
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
96fef93
Added 980x150 size (#3334)
hdeodhar Nov 29, 2018
e9bd097
replaced deprecated getWindowTopLocation with refererInfo.referer (#3…
bansawbanchee Nov 30, 2018
7aef26e
new TapHype bidder adapter (#3319)
aeliox Dec 3, 2018
6f1d23b
fix(adyoulike): use bidderRequest referer info (#3339)
j343my Dec 3, 2018
b215559
Fix for Quantum Adapter empty size detection (#3329)
benjaminclot Dec 4, 2018
5e3f144
update gulp packages to address vulnerability (#3343)
jsnellbaker Dec 4, 2018
96df52f
initial version of ozone adapter for review (#3307)
afsheenb Dec 4, 2018
f7473c7
update AdGenetation adapter (+1 squashed commit) (#3327)
banakemi Dec 4, 2018
d933a96
adding additional bid request validity checks. updating how we grab …
EMXDigital Dec 4, 2018
9e752d8
Update TTL to 30 mins (#3345)
Dec 4, 2018
9271d36
Set the OpenRTB device dimensions (#3336)
dbemiller Dec 4, 2018
00c955a
removing out console.log statements in ozoneBidAdapter test file (#3349)
jsnellbaker Dec 4, 2018
e8d9b1a
Prebid 1.35.0 Release
jsnellbaker Dec 4, 2018
650aa3a
increment pre version
jsnellbaker Dec 4, 2018
f80f2d5
Bidfluence Adapter update - Single call (#3347)
francescocristallo Dec 7, 2018
3b7f462
conditionally adds another param to browserParams (#3355)
susyt Dec 7, 2018
ca69912
enable ozone to support multiple bid responses (#3354)
afsheenb Dec 7, 2018
efc28ad
increment to correct pre version
jsnellbaker Dec 7, 2018
8fa2a84
update unit test example to mocha recommendations (#3361)
jsnellbaker Dec 7, 2018
522a0ce
Supply2 Bid Adapter (#3335)
Vishalrkanse Dec 7, 2018
13182f7
Dctr fixes (#3337)
pm-manasi-moghe Dec 7, 2018
5a2282e
Added publisher common ID support to sonobi adapter. (#3363)
edahood-sonobi Dec 10, 2018
239f180
adding native parameters: body2, rating, privacyLink (#3348)
aneuway2 Dec 10, 2018
f424cd2
Add user sync pixel logic in Adtelligent adapter (#3359)
GeneGenie Dec 10, 2018
88156e7
AppNexus debug auction via cookie (#3314)
aneuway2 Dec 10, 2018
4c1f690
fix bug when syncsPerBidder was set to 0 (#3360)
jsnellbaker Dec 13, 2018
ba49c0d
update conversant bid adapter to use video playerSize instead of size…
sohlhausen Dec 13, 2018
5253d29
Remove application json from bid request header (#3346)
ankur-modi Dec 13, 2018
bbc6316
feat(video-platform-ids): BID-3468: video support for platform IDs (#…
rjvelicaria Dec 14, 2018
32a611d
Add a new adapter for Appier bidder. (#3370)
PCMan-Appier Dec 14, 2018
65afce6
new no bid event and no bids available from auction (#3286)
snapwich Dec 17, 2018
14bf872
New bidder adapter for collectcent (#3365)
devcollectcent Dec 18, 2018
514fc5f
Added 640x360 size (#3388)
hdeodhar Dec 18, 2018
05df581
Added 250x800 size (#3390)
hdeodhar Dec 18, 2018
9277365
update AJA adapter: support user sync by iframe (#3382)
naoto0822 Dec 18, 2018
7224e78
Prebid 1.36.0 Release
Dec 18, 2018
691dcf6
Increment pre version
Dec 18, 2018
f2e5f17
add support for userSyncLimit field in s2sConfig (#3375)
jsnellbaker Dec 18, 2018
49ea705
Rivr thin adapter (#3351)
Dec 19, 2018
e5f4255
Fix multi-bid adId in Criteo bid adapter (#3340)
Spark-NF Dec 19, 2018
e476021
Modified the Telaria Bid Adapter to use bid.mediaTypes.video.playerSi…
telariaEng Dec 20, 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
Prev Previous commit
Next Next commit
add support for userSyncLimit field in s2sConfig (prebid#3375)
  • Loading branch information
jsnellbaker authored and mike-chowla committed Dec 18, 2018
commit f2e5f1751898b32f9d49cdc6074c113ac84d1ed5
5 changes: 5 additions & 0 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
@@ -100,6 +100,11 @@ function queueSync(bidderCodes, gdprConsent) {
account: _s2sConfig.accountId
};

let userSyncLimit = _s2sConfig.userSyncLimit;
if (utils.isNumber(userSyncLimit) && userSyncLimit > 0) {
payload['limit'] = userSyncLimit;
}

if (gdprConsent) {
// only populate gdpr field if we know CMP returned consent information (ie didn't timeout or have an error)
if (typeof gdprConsent.consentString !== 'undefined') {
42 changes: 42 additions & 0 deletions test/spec/modules/prebidServerBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -738,6 +738,48 @@ describe('S2S Adapter', function () {
value: ['buzz']
}]);
});

it('adds limit to the cookie_sync request if userSyncLimit is greater than 0', function () {
let cookieSyncConfig = utils.deepClone(CONFIG);
cookieSyncConfig.syncEndpoint = 'https://prebid.adnxs.com/pbs/v1/cookie_sync';
cookieSyncConfig.userSyncLimit = 1;

config.setConfig({ s2sConfig: cookieSyncConfig });

let bidRequest = utils.deepClone(BID_REQUESTS);
adapter.callBids(REQUEST, bidRequest, addBidResponse, done, ajax);
let requestBid = JSON.parse(requests[0].requestBody);

expect(requestBid.bidders).to.contain('appnexus').and.to.have.lengthOf(1);
expect(requestBid.account).is.equal('1');
expect(requestBid.limit).is.equal(1);
});

it('does not add limit to cooke_sync request if userSyncLimit is missing or 0', function () {
let cookieSyncConfig = utils.deepClone(CONFIG);
cookieSyncConfig.syncEndpoint = 'https://prebid.adnxs.com/pbs/v1/cookie_sync';
config.setConfig({ s2sConfig: cookieSyncConfig });

let bidRequest = utils.deepClone(BID_REQUESTS);
adapter.callBids(REQUEST, bidRequest, addBidResponse, done, ajax);
let requestBid = JSON.parse(requests[0].requestBody);

expect(requestBid.bidders).to.contain('appnexus').and.to.have.lengthOf(1);
expect(requestBid.account).is.equal('1');
expect(requestBid.limit).is.undefined;

cookieSyncConfig.userSyncLimit = 0;
config.resetConfig();
config.setConfig({ s2sConfig: cookieSyncConfig });

bidRequest = utils.deepClone(BID_REQUESTS);
adapter.callBids(REQUEST, bidRequest, addBidResponse, done, ajax);
requestBid = JSON.parse(requests[0].requestBody);

expect(requestBid.bidders).to.contain('appnexus').and.to.have.lengthOf(1);
expect(requestBid.account).is.equal('1');
expect(requestBid.limit).is.undefined;
});
});

describe('response handler', function () {