Skip to content

Commit

Permalink
Revert "Rubicon Bid Adapter : access x_source.tid from ortb2 object (#…
Browse files Browse the repository at this point in the history
…9940)" (#9953)

This reverts commit ba6a97f.
  • Loading branch information
robertrmartinez authored May 15, 2023
1 parent 3de4b67 commit 1e25e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export const spec = {
'rp_floor': (params.floor = parseFloat(params.floor)) >= 0.01 ? params.floor : undefined,
'rp_secure': '1',
'tk_flint': `${rubiConf.int_type || DEFAULT_INTEGRATION}_v$prebid.version$`,
'x_source.tid': deepAccess(bidderRequest, 'ortb2.source.tid'),
'x_source.tid': bidRequest.transactionId,
'x_imp.ext.tid': bidRequest.transactionId,
'l_pb_bid_id': bidRequest.bidId,
'p_screen_res': _getScreenResolution(),
Expand Down
10 changes: 3 additions & 7 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ describe('the rubicon adapter', function () {
bidderCode: 'rubicon',
auctionId: 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a',
bidderRequestId: '178e34bad3658f',
ortb2: { source: { tid: 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b' } },
bids: [
{
bidder: 'rubicon',
Expand Down Expand Up @@ -347,7 +346,6 @@ describe('the rubicon adapter', function () {
transactionId: 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b'
}
],
ortb2: { source: { tid: 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b' } },
start: 1472239426002,
auctionStart: 1472239426000,
timeout: 5000
Expand Down Expand Up @@ -621,6 +619,7 @@ describe('the rubicon adapter', function () {
'rand': '0.1',
'tk_flint': INTEGRATION,
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_imp.ext.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
'kw': 'a,b,c',
Expand Down Expand Up @@ -2277,8 +2276,6 @@ describe('the rubicon adapter', function () {
});

describe('createSlotParams', function () {
const localBidderRequest = Object.assign({}, bidderRequest);
localBidderRequest.ortb2 = {source: {tid: 'faked707-a418-42ec-b8a7-b70a6c6fab0b'}};
it('should return a valid slot params object', function () {
let expectedQuery = {
'account_id': '14062',
Expand All @@ -2289,8 +2286,7 @@ describe('the rubicon adapter', function () {
'p_pos': 'atf',
'rp_secure': /[01]/,
'tk_flint': INTEGRATION,
'x_source.tid': 'faked707-a418-42ec-b8a7-b70a6c6fab0b',
'x_imp.ext.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
'kw': 'a,b,c',
Expand All @@ -2303,7 +2299,7 @@ describe('the rubicon adapter', function () {
'rf': 'localhost'
};

const slotParams = spec.createSlotParams(bidderRequest.bids[0], localBidderRequest);
const slotParams = spec.createSlotParams(bidderRequest.bids[0], bidderRequest);

// test that all values above are both present and correct
Object.keys(expectedQuery).forEach(key => {
Expand Down

0 comments on commit 1e25e29

Please sign in to comment.