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

RTBHouse Bid Adapter: change source.tid to contain auctionId and populate imp-level ext.tid #9726

Merged
merged 60 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
4f86f16
RTBHouse Bid Adapter: add global vendor list id
rtbh-lotani Jan 24, 2022
f184cc2
Merge branch 'prebid:master' into master
rtbh-lotani Feb 2, 2022
2640076
Merge branch 'prebid:master' into master
rtbh-lotani Feb 2, 2022
2331c20
Merge branch 'prebid:master' into master
rtbh-lotani Jul 22, 2022
b59ea92
Merge branch 'prebid:master' into master
rtbh-lotani Jul 27, 2022
541f33f
structured user agent - browsers.brands
piotrj-rtbh Jul 27, 2022
21ee5a8
Merge pull request #1 from rtbh-lotani/piotrj
piotrj-rtbh Jul 29, 2022
a2be5fe
fix lint errors
piotrj-rtbh Aug 1, 2022
937b0c6
Merge pull request #2 from rtbh-lotani/piotrj
piotrj-rtbh Aug 1, 2022
257b37e
Added sda into rtbhouse adapter
Aug 17, 2022
9a3932b
Merge branch 'prebid:master' into master
piotrj-rtbh Aug 18, 2022
1c69c76
Merge branch 'prebid:master' into master
piotrj-rtbh Aug 25, 2022
e0db59f
spreading ortb2: user & site props
piotrj-rtbh Aug 25, 2022
e7adb7d
examples reverted
piotrj-rtbh Aug 25, 2022
04de645
Merge pull request #3 from rtbh-lotani/feature/added-sda
rtbh-lotani Aug 29, 2022
f8e06e0
Merge branch 'prebid:master' into master
rtbh-lotani Aug 29, 2022
ebb322d
Merge branch 'prebid:master' into master
piotrj-rtbh Aug 30, 2022
4fb3ed7
Merge branch 'prebid:master' into master
piotrj-rtbh Sep 15, 2022
0a814c3
Merge branch 'prebid:master' into master
piotrj-rtbh Sep 15, 2022
7438176
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 4, 2022
da25b1c
init version
piotrj-rtbh Oct 4, 2022
a795239
using mergedeep
piotrj-rtbh Oct 4, 2022
30a1880
Merge branch 'feature/sda-optimized' into feature/fledge
piotrj-rtbh Oct 4, 2022
9241601
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 6, 2022
20cb980
removed wrong imp array augm.; slot imp augm. with addtl check
piotrj-rtbh Oct 6, 2022
f041906
Merge branch 'prebid:master' into feature/fledge
piotrj-rtbh Oct 6, 2022
d5db4de
[SUA] merging ortb2.device into request
piotrj-rtbh Oct 7, 2022
f2b594c
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 7, 2022
a135e30
Merge branch 'prebid:master' into feature/fledge
piotrj-rtbh Oct 7, 2022
1950bad
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 18, 2022
e238c4f
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 18, 2022
aee6485
fledge auctionConfig adapted to our bid response structure
piotrj-rtbh Oct 20, 2022
97b10dd
new bidder response structure for fledge
piotrj-rtbh Oct 21, 2022
3839cda
make sure bidderRequest has proper flag turned on
piotrj-rtbh Oct 24, 2022
79ae34c
Merge branch 'prebid:master' into master
piotrj-rtbh Oct 24, 2022
5e21aad
Merge branch 'master' into feature/fledge-custombidder
piotrj-rtbh Oct 24, 2022
d0ec2de
fledge endpoint hardcoded; code cleanups
piotrj-rtbh Nov 4, 2022
3bae994
remove obsolete function
piotrj-rtbh Nov 4, 2022
33017b6
obsolete function removed
piotrj-rtbh Nov 4, 2022
06a98aa
[RTB House] Process FLEDGE request/response (#4)
piotrj-rtbh Nov 8, 2022
aca1dc0
Merge branch 'prebid:master' into master
piotrj-rtbh Nov 8, 2022
5f21dff
fixed lint errors
piotrj-rtbh Nov 8, 2022
604721c
Merge branch 'feature/fledge'
piotrj-rtbh Nov 8, 2022
7541807
Merge branch 'prebid:master' into master
piotrj-rtbh Nov 8, 2022
53a1668
Merge branch 'prebid:master' into master
piotrj-rtbh Nov 8, 2022
a58261e
Merge branch 'prebid:master' into master
piotrj-rtbh Nov 14, 2022
5a5407b
fledge test suites; adapter: delete imp.ext.ae when no fledge (#5)
piotrj-rtbh Nov 16, 2022
193c7cb
Merge branch 'prebid:master' into master
piotrj-rtbh Nov 16, 2022
f7d8d91
Merge branch 'prebid:master' into master
piotrj-rtbh Dec 12, 2022
6af59a8
Merge branch 'prebid:master' into master
piotrj-rtbh Jan 12, 2023
871f2e6
Merge branch 'prebid:master' into master
piotrj-rtbh Jan 26, 2023
b043df1
Merge branch 'prebid:master' into master
piotrj-rtbh Mar 24, 2023
4d756ff
RTBHouse Bid Adapter: use auctionId for source.tid
piotrj-rtbh Mar 24, 2023
8b333ec
RTBHouse bid adapter: fixed source.tid tests
piotrj-rtbh Mar 24, 2023
c057d32
Imp level transaction id + mapSource fix
piotrj-rtbh Mar 28, 2023
8796e6c
Merge branch 'prebid:master' into master
piotrj-rtbh Mar 29, 2023
57191de
lint: removed obsolete whitespaces
piotrj-rtbh Mar 29, 2023
4792c6a
Merge remote-tracking branch 'upstream/master' into rtbhouse/source.t…
piotrj-rtbh Mar 29, 2023
1aa38f7
RTBHouse Bid Adapter: change `source.tid` to contain `auctionId` and …
piotrj-rtbh Mar 29, 2023
46ab6de
Merge branch 'master' into rtbhouse/source.tid-as-auctionid
piotrj-rtbh Mar 29, 2023
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
13 changes: 10 additions & 3 deletions modules/rtbhouseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const spec = {
site: mapSite(validBidRequests, bidderRequest),
cur: DEFAULT_CURRENCY_ARR,
test: validBidRequests[0].params.test || 0,
source: mapSource(validBidRequests[0]),
source: mapSource(validBidRequests[0], bidderRequest),
};

if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) {
Expand Down Expand Up @@ -228,6 +228,13 @@ function mapImpression(slot, bidderRequest) {
delete imp.ext.ae;
}
}

const tid = deepAccess(slot, 'ortb2Imp.ext.tid');
if (tid) {
imp.ext = imp.ext || {};
imp.ext.tid = tid;
}

return imp;
}

Expand Down Expand Up @@ -283,9 +290,9 @@ function mapSite(slot, bidderRequest) {
* @param {object} slot Ad Unit Params by Prebid
* @returns {object} Source by OpenRTB 2.5 §3.2.2
*/
function mapSource(slot) {
function mapSource(slot, bidderRequest) {
const source = {
tid: slot.transactionId,
tid: bidderRequest?.auctionId || '',
};

return source;
Expand Down
32 changes: 23 additions & 9 deletions test/spec/modules/rtbhouseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ describe('RTBHouseAdapter', () => {

describe('buildRequests', function () {
let bidRequests;
const bidderRequest = {
'refererInfo': {
'numIframes': 0,
'reachedTop': true,
'referer': 'https://example.com',
'stack': ['https://example.com']
}
};
let bidderRequest;

beforeEach(() => {
bidderRequest = {
'auctionId': 'bidderrequest-auction-id',
'refererInfo': {
'numIframes': 0,
'reachedTop': true,
'referer': 'https://example.com',
'stack': ['https://example.com']
}
};
bidRequests = [
{
'bidder': 'rtbhouse',
Expand All @@ -82,6 +84,11 @@ describe('RTBHouseAdapter', () => {
'bidderRequestId': '22edbae2733bf6',
'auctionId': '1d1a030790a475',
'transactionId': 'example-transaction-id',
'ortb2Imp': {
'ext': {
'tid': 'ortb2Imp-transaction-id-1'
}
},
'schain': {
'ver': '1.0',
'complete': 1,
Expand Down Expand Up @@ -203,7 +210,7 @@ describe('RTBHouseAdapter', () => {
const bidRequest = Object.assign([], bidRequests);
const request = spec.buildRequests(bidRequest, bidderRequest);
const data = JSON.parse(request.data);
expect(data.source.tid).to.equal('example-transaction-id');
expect(data.source.tid).to.equal('bidderrequest-auction-id');
});

it('should include bidfloor from floor module if avaiable', () => {
Expand Down Expand Up @@ -256,6 +263,13 @@ describe('RTBHouseAdapter', () => {
expect(data.source).to.have.deep.property('tid');
});

it('should include impression level transaction id when provided', () => {
const bidRequest = Object.assign([], bidRequests);
const request = spec.buildRequests(bidRequest, bidderRequest);
const data = JSON.parse(request.data);
expect(data.imp[0].ext.tid).to.equal('ortb2Imp-transaction-id-1');
});

it('should not include invalid schain', () => {
const bidRequest = Object.assign([], bidRequests);
bidRequest[0].schain = {
Expand Down