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

EMX Digital Bid Adapter: add GPID support #7720

Merged
merged 39 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e7cb062
adding ccpa support for emx_digital adapter
Dec 9, 2019
5c0cfc1
emx_digital ccpa compliance: lint fix
Dec 10, 2019
4c0a008
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 17, 2019
676b419
emx 3.0 compliance update
Dec 17, 2019
36524b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
ncolletti Jan 29, 2020
ec9f12f
Merge remote-tracking branch 'upstream/master'
Apr 22, 2020
9d96181
fix outstream renderer issue, update test spec
Apr 22, 2020
7a5fad2
sync with upstream
Apr 23, 2020
de685c9
Merge branch 'bug/EI-34'
Apr 23, 2020
b2d22a3
refactor formatVideoResponse function to use core-js/find
Apr 29, 2020
5b54a8c
Merge remote-tracking branch 'upstream/master'
DBogdanEMX Aug 15, 2020
29b8d20
Merge remote-tracking branch 'upstream/master'
Nov 9, 2020
aba7bb5
Merge remote-tracking branch 'upstream/master' into add_schain_forwar…
Nov 9, 2020
9be10ca
Add support for schain forwarding
Nov 9, 2020
080b2c7
Merge branch 'add_schain_forwarding'
Nov 9, 2020
09ec591
Merge remote-tracking branch 'upstream/master'
Nov 20, 2020
558a791
Resolved issue with Schain object location
Nov 20, 2020
734a72b
Merge remote-tracking branch 'upstream/master'
Dec 3, 2020
c33a070
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Dec 15, 2020
6a06e18
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jan 19, 2021
b22ed51
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 10, 2021
9f235e7
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 11, 2021
ab197dc
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 12, 2021
fc0ab49
prebid 5.0 floor module and advertiserDomain support
rakeshbalakrishnan28 May 19, 2021
372e1bb
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 May 20, 2021
08dc8e2
Merge remote-tracking branch 'origin/prebid-5.0-support'
rakeshbalakrishnan28 May 20, 2021
6c943ef
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jun 21, 2021
993346e
liveramp idl and uid2.0 support for prebid
rakeshbalakrishnan28 Jun 24, 2021
5d71941
Merge remote-tracking branch 'upstream/master'
rakeshbalakrishnan28 Jul 1, 2021
f96690e
Merge pull request #2 from EMXDigital/liveramp_uid2_sidecar_support
EMXDigital Jul 1, 2021
e153e25
sync with upstream
Nov 16, 2021
a77f39e
gpid support
Nov 16, 2021
fd0b36c
remove utils ext
Nov 16, 2021
9c73f63
remove empty line
Nov 16, 2021
2bc9b4f
remove trailing spaces
Nov 16, 2021
fab9c22
move gpid test module
Nov 16, 2021
811e24f
move gpid test module
Nov 16, 2021
0716d9c
removing trailing spaces from unit test
Nov 16, 2021
1befe07
remove comments from unit test
Nov 16, 2021
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
10 changes: 9 additions & 1 deletion modules/emx_digitalBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,18 @@ export const spec = {
tagid,
secure
};

// adding gpid support
let gpid = deepAccess(bid, 'ortb2Imp.ext.data.adserver.adslot');
if (!gpid) {
gpid = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
}
if (gpid) {
data.ext = {gpid: gpid.toString()};
}
let typeSpecifics = isVideo ? { video: emxAdapter.buildVideo(bid) } : { banner: emxAdapter.buildBanner(bid) };
let bidfloorObj = bidfloor > 0 ? { bidfloor, bidfloorcur: DEFAULT_CUR } : {};
let emxBid = Object.assign(data, typeSpecifics, bidfloorObj);

emxImps.push(emxBid);
});

Expand Down
10 changes: 10 additions & 0 deletions test/spec/modules/emx_digitalBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,16 @@ describe('emx_digital Adapter', function () {
});
});

it('should add gpid to request if present', () => {
const gpid = '/12345/my-gpt-tag-0';
let bid = utils.deepClone(bidderRequest.bids[0]);
bid.ortb2Imp = { ext: { data: { adserver: { adslot: gpid } } } };
bid.ortb2Imp = { ext: { data: { pbadslot: gpid } } };
let requestWithGPID = spec.buildRequests([bid], bidderRequest);
requestWithGPID = JSON.parse(requestWithGPID.data);
expect(requestWithGPID.imp[0].ext.gpid).to.exist.and.equal(gpid);
});

it('should add UID 2.0 to request', () => {
const uid2 = { id: '456' };
const bidRequestWithUID = utils.deepClone(bidderRequest);
Expand Down