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

RP Bid Adapter: Send config user.id as GET and XAPI bidRequest params #5666

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
8d635ff
Add microadBidAdapter
Feb 15, 2019
3055b90
Remove unnecessary encodeURIComponent from microadBidAdapter
Feb 26, 2019
67fb91b
Submit Advangelists Prebid Adapter
Feb 26, 2019
3ebb916
Submit Advangelists Prebid Adapter 1.1
Feb 27, 2019
4f5c451
Correct procudtion endpoint for prebid
Feb 28, 2019
2dc6d1d
Merge branch 'microad-bid-adapter' of git://github.com/strong-zero/Pr…
Feb 28, 2019
fa3e081
Merge remote-tracking branch 'origin/master' into master-rubicon-clean
Mar 18, 2019
600a46e
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Mar 18, 2019
7f578b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 23, 2019
176a312
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 26, 2019
9abf89c
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2019
6ce04ab
Merge remote-tracking branch 'upstream/master'
Jun 10, 2019
415e2f6
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jun 27, 2019
61fb82c
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 11, 2019
3cc4c67
analytics update with wrapper name
Jul 11, 2019
cd81e02
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
e2b4e04
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
53b5970
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
5c00ed5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 16, 2019
28848ad
reverted error merge
Jul 16, 2019
ab635ee
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 19, 2019
93308f5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 24, 2019
1cfd52d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 25, 2019
d619807
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 27, 2019
9893f0f
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
986a251
Merge remote-tracking branch 'upstream/master'
Aug 23, 2019
2cae7c0
Merge branch 'master' of https://github.com/prebid/Prebid.js into ori…
Aug 27, 2019
d7fd252
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 4, 2019
c7c01ba
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
24a28aa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
7a1a4ec
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Sep 25, 2019
4173d16
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 25, 2019
ca13952
update changed default value of netRevenue to true
Sep 27, 2019
0b6cd48
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
5f0110d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
f930a34
Merge remote-tracking branch 'upstream/master'
Oct 8, 2019
9bff282
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 14, 2019
712ec9e
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
f192f65
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
006f53c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 29, 2019
0341150
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 31, 2019
fa59897
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 15, 2019
dcff2cf
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 20, 2019
0222ce2
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 24, 2019
227beca
Merge branch 'master' of https://github.com/prebid/Prebid.js
Nov 25, 2019
dc3ee49
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Dec 4, 2019
9a5a08d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 4, 2019
35ea5d4
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 6, 2019
f89b71c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 17, 2019
4e1679b
Re-add rubicon analytics without deprecated getTopWindowUrl util
Dec 17, 2019
fd80acd
Cache referrer on auction_init instead of bid_requested
Dec 17, 2019
2ab26a3
Merge pull request #51 from rubicon-project/rubicon-analytics-3.0
msm0504 Dec 17, 2019
7de7ca6
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Jan 9, 2020
5f1fe06
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 9, 2020
60b5ad8
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jan 17, 2020
5f44edd
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Feb 10, 2020
4809354
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 10, 2020
8d8bdff
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 13, 2020
a1a2318
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 19, 2020
ac2ac12
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 24, 2020
5ce8787
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Mar 12, 2020
6c2bdec
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 12, 2020
a54a491
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 27, 2020
889178d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 27, 2020
40cba46
Merge branch 'master' of https://github.com/prebid/Prebid.js
Apr 4, 2020
cc5d929
Merge remote-tracking branch 'remote/master'
Apr 23, 2020
5574a52
merged remote master changes
Apr 24, 2020
ba62245
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 1, 2020
1fe62f9
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 5, 2020
a4d1d62
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2020
7215461
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 20, 2020
258c555
Merge remote-tracking branch 'origin/master'
May 20, 2020
a921ac9
Merge remote-tracking branch 'remotes/remote/master'
Jun 3, 2020
90975d1
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jun 5, 2020
aac67fa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jun 18, 2020
585993c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 8, 2020
20f5825
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 16, 2020
8ce42f0
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 4, 2020
253b8bb
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 17, 2020
dc7fba5
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 18, 2020
b93665b
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 21, 2020
6e60389
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 26, 2020
b995ce9
pass config user.id to get and xapi requests
Aug 26, 2020
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
12 changes: 12 additions & 0 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ export const spec = {
}
}

// set user.id value from config value
const configUserId = config.getConfig('user.id');
if (configUserId) {
utils.deepSetValue(data, 'user.id', configUserId);
}

if (config.getConfig('coppa') === true) {
utils.deepSetValue(data, 'regs.coppa', 1);
}
Expand Down Expand Up @@ -587,6 +593,12 @@ export const spec = {
}
}

// set ppuid value from config value
const configUserId = config.getConfig('user.id');
if (configUserId) {
data['ppuid'] = configUserId;
}

if (bidderRequest.gdprConsent) {
// add 'gdpr' only if 'gdprApplies' is defined
if (typeof bidderRequest.gdprConsent.gdprApplies === 'boolean') {
Expand Down
88 changes: 87 additions & 1 deletion test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,24 @@ describe('the rubicon adapter', function () {
expect(data['eid_sharedid.org']).to.equal('1111^3^2222');
});
});
})

describe('Config user.id support', function () {
it('should send ppuid when config defines user.id', function () {
config.setConfig({ user: { id: '123' } });
const clonedBid = utils.deepClone(bidderRequest.bids[0]);
clonedBid.userId = {
sharedid: {
id: '1111',
third: '2222'
}
};
let [request] = spec.buildRequests([clonedBid], bidderRequest);
let data = parseQuery(request.data);

expect(data['ppuid']).to.equal('123');
});
});
});

describe('Prebid AdSlot', function () {
beforeEach(function () {
Expand Down Expand Up @@ -2023,6 +2040,75 @@ describe('the rubicon adapter', function () {
const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
expect(request.data.ext.prebid.bidders.rubicon.integration).to.equal('testType');
});

it('should pass the user.id provided in the config', function () {
config.setConfig({ user: { id: '123' } });
createVideoBidderRequest();

sandbox.stub(Date, 'now').callsFake(() =>
bidderRequest.auctionStart + 100
);

let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
let post = request.data;

expect(post).to.have.property('imp')
// .with.length.of(1);
let imp = post.imp[0];
expect(imp.id).to.equal(bidderRequest.bids[0].adUnitCode);
expect(imp.exp).to.equal(300);
expect(imp.video.w).to.equal(640);
expect(imp.video.h).to.equal(480);
expect(imp.video.pos).to.equal(1);
expect(imp.video.context).to.equal('instream');
expect(imp.video.minduration).to.equal(15);
expect(imp.video.maxduration).to.equal(30);
expect(imp.video.startdelay).to.equal(0);
expect(imp.video.skip).to.equal(1);
expect(imp.video.skipafter).to.equal(15);
expect(imp.ext.rubicon.video.playerWidth).to.equal(640);
expect(imp.ext.rubicon.video.playerHeight).to.equal(480);
expect(imp.ext.rubicon.video.size_id).to.equal(201);
expect(imp.ext.rubicon.video.language).to.equal('en');
// Also want it to be in post.site.content.language
expect(post.site.content.language).to.equal('en');
expect(imp.ext.rubicon.video.skip).to.equal(1);
expect(imp.ext.rubicon.video.skipafter).to.equal(15);
expect(imp.ext.prebid.auctiontimestamp).to.equal(1472239426000);
expect(post.user.ext.consent).to.equal('BOJ/P2HOJ/P2HABABMAAAAAZ+A==');
expect(post.user.ext.eids[0].source).to.equal('liveintent.com');
expect(post.user.ext.eids[0].uids[0].id).to.equal('0000-1111-2222-3333');
expect(post.user.ext.tpid).that.is.an('object');
expect(post.user.ext.tpid.source).to.equal('liveintent.com');
expect(post.user.ext.tpid.uid).to.equal('0000-1111-2222-3333');
// LiveRamp should exist
expect(post.user.ext.eids[1].source).to.equal('liveramp_idl');
expect(post.user.ext.eids[1].uids[0].id).to.equal('1111-2222-3333-4444');
// SharedId should exist
expect(post.user.ext.eids[2].source).to.equal('sharedid.org');
expect(post.user.ext.eids[2].uids[0].id).to.equal('1111');
expect(post.user.ext.eids[2].uids[0].atype).to.equal(3);
expect(post.user.ext.eids[2].uids[0].ext.third).to.equal('2222');

expect(post.rp).that.is.an('object');
expect(post.rp.target).that.is.an('object');
expect(post.rp.target.LIseg).that.is.an('array');
expect(post.rp.target.LIseg[0]).to.equal('segA');
expect(post.rp.target.LIseg[1]).to.equal('segB');

// Config user.id
expect(post.user.id).to.equal('123');

expect(post.regs.ext.gdpr).to.equal(1);
expect(post.regs.ext.us_privacy).to.equal('1NYN');
expect(post).to.have.property('ext').that.is.an('object');
expect(post.ext.prebid.targeting.includewinners).to.equal(true);
expect(post.ext.prebid).to.have.property('cache').that.is.an('object');
expect(post.ext.prebid.cache).to.have.property('vastxml').that.is.an('object');
expect(post.ext.prebid.cache.vastxml).to.have.property('returnCreative').that.is.an('boolean');
expect(post.ext.prebid.cache.vastxml.returnCreative).to.equal(false);
expect(post.ext.prebid.bidders.rubicon.integration).to.equal(PBS_INTEGRATION);
})
});

describe('combineSlotUrlParams', function () {
Expand Down