Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d8779ee
* Update undertone adapter - change parameters - placementId paramete…
omerko May 30, 2018
6785395
* Update undertone adapter - change parameters - placementId paramete…
omerko May 30, 2018
c5611e3
fix lint issue in undertone adapter spec
omerko May 30, 2018
eea398e
Merge branch 'master' of https://github.com/prebid/Prebid.js
omerko Jul 15, 2018
ddcce01
added user sync function to undertone adapter
omerko Sep 13, 2018
2d5bd83
* Update undertone adapter - change parameters - placementId paramete…
omerko May 30, 2018
a33df49
added user sync function to undertone adapter
omerko Sep 13, 2018
467a238
added user sync function to undertone adapter
omerko Sep 16, 2018
4f3342c
Merge remote-tracking branch 'origin/master'
omerko Sep 16, 2018
95228a2
revert package-lock.json
omerko Oct 11, 2018
852cd6d
Merge branch 'master' of https://github.com/prebid/Prebid.js
AnnaPerion Mar 8, 2020
55fad56
added user sync function to undertone adapter
omerko Sep 13, 2018
33bf123
Merge branch 'master' of https://github.com/PerionNet/Prebid.js
AnnaPerion Mar 25, 2020
beba2be
Update undertoneBidAdapter.js
AnnaPerion Mar 25, 2020
bf43be9
Merge branch 'master' of https://github.com/prebid/Prebid.js
AnnaPerion Jun 28, 2020
2f99051
Merge remote-tracking branch 'upstream/master'
AnnaPerion Jul 12, 2020
b9d2b8f
Merge branch 'prebid:master' into master
oranperion Jun 3, 2021
c5be0d7
Update browsers.json
tamirnPerion Aug 17, 2021
3490951
Merge branch 'prebid:master' into master
tamirnPerion Oct 31, 2021
9e97cba
Merge branch 'master' of https://github.com/PerionNet/Prebid.js
tamarm-p Nov 10, 2021
d081f73
Merge branch 'prebid:master' into master
tamarm-perion Jun 27, 2022
f3254c6
Merge branch 'prebid:master' into master
tamarm-perion Jun 30, 2022
84a2a98
Merge branch 'prebid:master' into master
tamarm-perion Nov 17, 2022
51297c3
Merge remote-tracking branch 'upstream/master'
idanbotbol May 29, 2023
b18441e
Undertone: added GPP support and video plcmt
idanbotbol May 29, 2023
4408d7f
Merge branch 'prebid:master' into master
idanbotbol May 29, 2023
91818eb
Merge pull request #37 from PerionNet/UN-38024
idanbotbol May 29, 2023
60a1be2
Merge branch 'prebid:master' into master
idanbotbol May 31, 2023
36bdc56
Fix lint issues
idanbotbol Jun 1, 2023
4c70b42
Merge pull request #38 from PerionNet/UN-38164
idanbotbol Jun 1, 2023
49bdacf
Merge branch 'prebid:master' into master
idanbotbol Jun 1, 2023
0b55ee4
Merge branch 'prebid:master' into master
kerenga Jun 15, 2023
5b68908
Merge branch 'prebid:master' into master
idanbotbol Aug 30, 2023
11485ab
Merge branch 'prebid:master' into master
idanbotbol Sep 4, 2023
746c2ca
Merge branch 'prebid:master' into master
kerenga Apr 14, 2024
41a4a76
Merge branch 'prebid:master' into master
tamarm-p Feb 12, 2025
c19757d
Merge branch 'prebid:master' into master
tamarm-p Mar 24, 2026
8bc910f
Merge branch 'prebid:master' into master
tamarm-p Nov 22, 2026
8137f9c
Undertone Bid Adapter: send user EIDs as uids
tamarm-p Nov 22, 2026
1d0cd66
rtb 2.6 path support
tamarm-p Nov 23, 2026
2bef82e
Merge branch 'master' into agent/undertone-send-eids-as-uids
tamarm-p Nov 23, 2026
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
5 changes: 5 additions & 0 deletions modules/undertoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
const viewport = getViewportCoordinates();
return [Math.round(left + (viewport.left || 0)), Math.round(top + (viewport.top || 0))];
}
return null;

Check warning on line 55 in modules/undertoneBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

55 line is not covered with tests
}

export const spec = {
Expand Down Expand Up @@ -82,6 +82,11 @@
if (schain) {
commons.schain = schain;
}
const user = bidderRequest.ortb2?.user;
const eids = [...(user?.ext?.eids ?? []), ...(user?.eids ?? [])];
if (eids.length) {
commons.uids = eids;
}
const payload = {
'x-ut-hb-params': [],
'commons': commons
Expand All @@ -92,7 +97,7 @@
commons.referrer = referer;
}
if (canonicalUrl) {
commons.canonicalUrl = canonicalUrl;

Check warning on line 100 in modules/undertoneBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

100 line is not covered with tests
}
const hostname = parseUrl(referer).hostname;
const domain = extractDomainFromHost(hostname);
Expand Down
39 changes: 28 additions & 11 deletions test/spec/modules/undertoneBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,7 @@ const bidReqUserIds = [{
},
sizes: [[300, 250], [300, 600]],
bidId: '263be71e91dd9d',
auctionId: '9ad1fa8d-2297-4660-a018-b39945054746',
userId: {
idl_env: '1111',
tdid: '123456',
digitrustid: { data: { id: 'DTID', keyv: 4, privacy: { optout: false }, producer: 'ABC', version: 2 } },
id5id: { uid: '1111' }
}
auctionId: '9ad1fa8d-2297-4660-a018-b39945054746'
},
{
bidder: BIDDER_CODE,
Expand Down Expand Up @@ -489,11 +483,34 @@ describe('Undertone Adapter', () => {
expect(bidVideo2.video.plcmt).to.equal(null);
expect(bidVideo2.gpid).to.equal('/1111/pbadslot#728x90');
});
it('should not send a raw bid.userId as uids', function () {
const request = spec.buildRequests(bidReqUserIds, bidderReq);
it('should send ortb2 user eids as uids', function () {
const eids = [
{ source: 'adserver.org', uids: [{ id: '123456', atype: 1, ext: { rtiPartner: 'TDID' } }] },
{ source: 'pubcid.org', uids: [{ id: 'pubcid-1', atype: 1 }] }
];
const request = spec.buildRequests(bidReqUserIds, { ...bidderReq, ortb2: { user: { ext: { eids } } } });
const bidCommons = JSON.parse(request.data)['commons'];
expect(bidCommons).to.be.an('object');
expect(bidCommons).to.not.have.property('uids');
expect(bidCommons.uids).to.deep.equal(eids);
});
it('should send ortb 2.6 user.eids as uids', function () {
const eids = [{ source: '51d.es', uids: [{ id: '51d-1', atype: 1 }] }];
const request = spec.buildRequests(bidReqUserIds, { ...bidderReq, ortb2: { user: { eids } } });
const bidCommons = JSON.parse(request.data)['commons'];
expect(bidCommons.uids).to.deep.equal(eids);
});
it('should send eids from both user.ext.eids and user.eids, ext first', function () {
const extEids = [{ source: 'pubcid.org', uids: [{ id: 'pubcid-1', atype: 1 }] }];
const eids = [{ source: '51d.es', uids: [{ id: '51d-1', atype: 1 }] }];
const request = spec.buildRequests(bidReqUserIds, { ...bidderReq, ortb2: { user: { eids, ext: { eids: extEids } } } });
const bidCommons = JSON.parse(request.data)['commons'];
expect(bidCommons.uids).to.deep.equal([...extEids, ...eids]);
});
it('should not send uids when there are no eids', function () {
[undefined, { user: { ext: { eids: [] } } }, { user: { eids: [] } }].forEach(ortb2 => {
const request = spec.buildRequests(bidReqUserIds, { ...bidderReq, ortb2 });
const bidCommons = JSON.parse(request.data)['commons'];
expect(bidCommons).to.not.have.property('uids');
});
});
it('should send page sizes sizes correctly', function () {
const request = spec.buildRequests(bidReqUserIds, bidderReq);
Expand Down
Loading