From 7f524a9f946b7c8b92c1a01aa8f935c358c6668b Mon Sep 17 00:00:00 2001 From: robertrmartinez Date: Tue, 29 Aug 2023 10:02:44 -0700 Subject: [PATCH 1/2] drop atype for rubicon eid --- modules/rubiconBidAdapter.js | 4 +++- test/spec/modules/rubiconBidAdapter_spec.js | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/rubiconBidAdapter.js b/modules/rubiconBidAdapter.js index caeb6b3ced2..2c2a02e1949 100644 --- a/modules/rubiconBidAdapter.js +++ b/modules/rubiconBidAdapter.js @@ -537,7 +537,9 @@ export const spec = { data['eid_id5-sync.com'] = `${eid.uids[0].id}^${eid.uids[0].atype}^${(eid.uids[0].ext && eid.uids[0].ext.linkType) || ''}`; } else { // add anything else with this generic format - data[`eid_${eid.source}`] = `${eid.uids[0].id}^${eid.uids[0].atype || ''}`; + // if rubicon drop ^ + const id = eid.source === 'rubiconproject.com' ? eid.uids[0].id : `${eid.uids[0].id}^${eid.uids[0].atype || ''}` + data[`eid_${eid.source}`] = id; } // send AE "ppuid" signal if exists, and hasn't already been sent if (!data['ppuid']) { diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index dc3ff1cb871..33eff0ffc16 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -1577,6 +1577,22 @@ describe('the rubicon adapter', function () { expect(data['eid_catchall']).to.equal('11111^2'); }); + + it('should send rubiconproejct special case', function () { + const clonedBid = utils.deepClone(bidderRequest.bids[0]); + // Hardcoding userIdAsEids since createEidsArray returns empty array if source not found in eids.js + clonedBid.userIdAsEids = [{ + source: 'rubiconproject.com', + uids: [{ + id: 'some-cool-id', + atype: 3 + }] + }] + let [request] = spec.buildRequests([clonedBid], bidderRequest); + let data = parseQuery(request.data); + + expect(data['eid_rubiconproject.com']).to.equal('some-cool-id'); + }); }); describe('Config user.id support', function () { From 33c97373df4db0aa83febe685454fe77719e9ae9 Mon Sep 17 00:00:00 2001 From: robertrmartinez Date: Tue, 29 Aug 2023 15:34:30 -0700 Subject: [PATCH 2/2] i spell bad --- test/spec/modules/rubiconBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index 33eff0ffc16..dd6f52c0646 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -1578,7 +1578,7 @@ describe('the rubicon adapter', function () { expect(data['eid_catchall']).to.equal('11111^2'); }); - it('should send rubiconproejct special case', function () { + it('should send rubiconproject special case', function () { const clonedBid = utils.deepClone(bidderRequest.bids[0]); // Hardcoding userIdAsEids since createEidsArray returns empty array if source not found in eids.js clonedBid.userIdAsEids = [{