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

Rubicon Bid Adapter: Format rubicon EID #10409

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 3 additions & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down
16 changes: 16 additions & 0 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,22 @@ describe('the rubicon adapter', function () {

expect(data['eid_catchall']).to.equal('11111^2');
});

it('should send rubiconproejct special case', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my strong suit!

fixed.

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 () {
Expand Down