Skip to content

Commit 71a6945

Browse files
tmielcarzTomasz Mielcarz
authored andcommitted
Adrino Bid Adapter: pass userId object to bidder (prebid#8966)
* New config parameter for a custom adserver domain * test fix * new test * pass userId object to bidder Co-authored-by: Tomasz Mielcarz <[email protected]>
1 parent 42d0002 commit 71a6945

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

modules/adrinoBidAdapter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const spec = {
4040
bidId: validBidRequests[i].bidId,
4141
nativeParams: validBidRequests[i].nativeParams,
4242
placementHash: validBidRequests[i].params.hash,
43-
// TODO: is 'page' the right value here?
43+
userId: validBidRequests[i].userId,
4444
referer: bidderRequest.refererInfo.page,
4545
userAgent: navigator.userAgent,
4646
}

test/spec/modules/adrinoBidAdapter_spec.js

+10
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ describe('adrinoBidAdapter', function () {
7171
}
7272
}
7373
},
74+
userId: { criteoId: '2xqi3F94aHdwWnM3', pubcid: '3ec0b202-7697' },
7475
adUnitCode: 'adunit-code',
7576
bidId: '12345678901234',
7677
bidderRequestId: '98765432109876',
@@ -92,6 +93,9 @@ describe('adrinoBidAdapter', function () {
9293
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
9394
expect(result[0].data).to.have.property('nativeParams');
9495
expect(result[0].data).not.to.have.property('gdprConsent');
96+
expect(result[0].data).to.have.property('userId');
97+
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
98+
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
9599
});
96100

97101
it('should build the request correctly with gdpr', function () {
@@ -108,6 +112,9 @@ describe('adrinoBidAdapter', function () {
108112
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
109113
expect(result[0].data).to.have.property('nativeParams');
110114
expect(result[0].data).to.have.property('gdprConsent');
115+
expect(result[0].data).to.have.property('userId');
116+
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
117+
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
111118
});
112119

113120
it('should build the request correctly without gdpr', function () {
@@ -124,6 +131,9 @@ describe('adrinoBidAdapter', function () {
124131
expect(result[0].data.userAgent).to.equal(navigator.userAgent);
125132
expect(result[0].data).to.have.property('nativeParams');
126133
expect(result[0].data).not.to.have.property('gdprConsent');
134+
expect(result[0].data).to.have.property('userId');
135+
expect(result[0].data.userId.criteoId).to.equal('2xqi3F94aHdwWnM3');
136+
expect(result[0].data.userId.pubcid).to.equal('3ec0b202-7697');
127137
});
128138
});
129139

0 commit comments

Comments
 (0)