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

Prebid 8: stop using transactionId as source.tid on ortb2 payloads #9916

Merged
merged 31 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c54392f
Update bizzclickBidAdapter.js
patmmccann May 8, 2023
c95c410
Update rubiconBidAdapter.js
patmmccann May 8, 2023
0f55a62
Update gothamadsBidAdapter.js
patmmccann May 8, 2023
b337ff2
Update luponmediaBidAdapter.js
patmmccann May 8, 2023
3abf744
Update ozoneBidAdapter.js
patmmccann May 8, 2023
34e9d3a
Update pubmaticBidAdapter.js
patmmccann May 8, 2023
6accbed
Update improvedigitalBidAdapter.js
patmmccann May 8, 2023
8c2605c
Update newspassidBidAdapter.js
patmmccann May 8, 2023
9ca93b4
Update deltaprojectsBidAdapter.js
patmmccann May 8, 2023
c118441
Update bizzclickBidAdapter.js
patmmccann May 8, 2023
d047d45
Update deltaprojectsBidAdapter.js
patmmccann May 8, 2023
3f8a4d8
Update gothamadsBidAdapter.js
patmmccann May 8, 2023
62e3e96
Update luponmediaBidAdapter.js
patmmccann May 8, 2023
cbc6129
Update newspassidBidAdapter.js
patmmccann May 8, 2023
634616c
Update ozoneBidAdapter.js
patmmccann May 8, 2023
2471b2f
Update pubmaticBidAdapter.js
patmmccann May 8, 2023
654867b
Update rubiconBidAdapter.js
patmmccann May 8, 2023
f791db0
Update improvedigitalBidAdapter_spec.js
patmmccann May 8, 2023
a15d2d1
Update luponmediaBidAdapter_spec.js
patmmccann May 8, 2023
d13f114
Update rubiconBidAdapter_spec.js
patmmccann May 8, 2023
0e21a63
Update improvedigitalBidAdapter.js
patmmccann May 8, 2023
68259df
Update pubmaticBidAdapter.js
patmmccann May 8, 2023
6a3b597
Update improvedigitalBidAdapter.js
patmmccann May 8, 2023
b953294
Update pubmaticBidAdapter.js
patmmccann May 8, 2023
1fa5aab
Update pubmaticBidAdapter.js
patmmccann May 8, 2023
d0108c3
Update pubmaticBidAdapter_spec.js
patmmccann May 8, 2023
3a10d72
Update adtrueBidAdapter.js
patmmccann May 8, 2023
26830ce
Update adtrueBidAdapter_spec.js
patmmccann May 8, 2023
36fe678
Update adtrueBidAdapter.js
patmmccann May 8, 2023
5f3662a
Update adtrueBidAdapter_spec.js
patmmccann May 8, 2023
b4c2e07
Update adtrueBidAdapter_spec.js
patmmccann May 8, 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
2 changes: 1 addition & 1 deletion modules/adtrueBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ export const spec = {
if (typeof config.getConfig('device') === 'object') {
payload.device = Object.assign(payload.device, config.getConfig('device'));
}
deepSetValue(payload, 'source.tid', conf.transactionId);

// test bids
if (window.location.href.indexOf('adtrueTest=true') !== -1) {
payload.test = 1;
Expand Down
2 changes: 1 addition & 1 deletion modules/bizzclickBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const spec = {
host: location.host
},
source: {
tid: bidRequest.transactionId,
tid: bidRequest.auctionId,
ext: {
schain: {}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/deltaprojectsBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function buildOpenRTBRequest(validBidRequest, id, site, device, user, tmax, regs

// build source
const source = {
tid: validBidRequest.transactionId,
tid: validBidRequest.auctionId,
fd: 1,
}

Expand Down
2 changes: 1 addition & 1 deletion modules/gothamadsBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const spec = {
host: location.host
},
source: {
tid: bidRequest.transactionId
tid: bidRequest.auctionId
},
regs: {
coppa: config.getConfig('coppa') === true ? 1 : 0,
Expand Down
2 changes: 1 addition & 1 deletion modules/improvedigitalBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const CONVERTER = ortbConverter({
id: getUniqueIdentifierStr(),
source: {
// TODO: once https://github.com/prebid/Prebid.js/issues/8573 is resolved, this should be handled by the base ortbConverter logic
tid: context.bidRequests[0].transactionId,
tid: context.bidRequests[0].auctionId,
},
ext: {
improvedigital: {
Expand Down
2 changes: 1 addition & 1 deletion modules/luponmediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function newOrtbBidRequest(bidRequest, bidderRequest, currentImps) {
id: bidRequest.transactionId,
test: config.getConfig('debug') ? 1 : 0,
source: {
tid: bidRequest.transactionId
tid: bidRequest.auctionId
},
tmax: bidderRequest.timeout,
imp: currentImps.concat([{
Expand Down
2 changes: 1 addition & 1 deletion modules/newspassidBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export const spec = {
npRequestSingle.auctionId = imp.ext['newspassid'].transactionId; // not sure if this should be here?
npRequestSingle.imp = [imp];
npRequestSingle.ext = extObj;
deepSetValue(npRequestSingle, 'source.tid', imp.ext['newspassid'].transactionId);// RTB 2.5 : tid is Transaction ID that must be common across all participants in this bid request (e.g., potentially multiple exchanges).
deepSetValue(npRequestSingle, 'source.tid', bidderRequest.auctionId);// RTB 2.5 : tid is Transaction ID that must be common across all participants in this bid request (e.g., potentially multiple exchanges).
deepSetValue(npRequestSingle, 'user.ext.eids', userExtEids);
logInfo('buildRequests RequestSingle (for non-single) = ', npRequestSingle);
return {
Expand Down
2 changes: 1 addition & 1 deletion modules/ozoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export const spec = {
ozoneRequestSingle.auctionId = imp.ext[whitelabelBidder].transactionId; // not sure if this should be here?
ozoneRequestSingle.imp = [imp];
ozoneRequestSingle.ext = extObj;
deepSetValue(ozoneRequestSingle, 'source.tid', imp.ext[whitelabelBidder].transactionId);// RTB 2.5 : tid is Transaction ID that must be common across all participants in this bid request (e.g., potentially multiple exchanges).
deepSetValue(ozoneRequestSingle, 'source.tid', bidderRequest.auctionId);// RTB 2.5 : tid is Transaction ID that must be common across all participants in this bid request (e.g., potentially multiple exchanges).
deepSetValue(ozoneRequestSingle, 'user.ext.eids', userExtEids);
logInfo('buildRequests RequestSingle (for non-single) = ', ozoneRequestSingle);
return {
Expand Down
4 changes: 1 addition & 3 deletions modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,7 @@ export const spec = {
// update device.language to ISO-639-1-alpha-2 (2 character language)
payload.device.language = payload.device.language && payload.device.language.split('-')[0];

// passing transactionId in source.tid
deepSetValue(payload, 'source.tid', conf.transactionId);

// passing nothing in source.tid -- Pubmatic can correct in a future PR
// test bids
if (window.location.href.indexOf('pubmaticTest=true') !== -1) {
payload.test = 1;
Expand Down
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,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': bidRequest.transactionId,
'x_source.tid': bidRequest.auctionId,
'x_imp.ext.tid': bidRequest.transactionId,
'l_pb_bid_id': bidRequest.bidId,
'p_screen_res': _getScreenResolution(),
Expand Down
3 changes: 0 additions & 3 deletions test/spec/modules/adtrueBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ describe('AdTrueBidAdapter', function () {
expect(data.site.domain).to.be.a('string'); // domain should be set
expect(data.site.publisher.id).to.equal(bidRequests[0].params.publisherId); // publisher Id
expect(data.ext.wrapper.transactionId).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.source.tid).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.imp[0].id).to.equal(bidRequests[0].bidId); // Prebid bid id is passed as id
expect(data.imp[0].bidfloor).to.equal(bidRequests[0].params.reserve); // reverse
expect(data.imp[0].tagid).to.equal(bidRequests[0].params.zoneId); // zoneId
Expand All @@ -304,7 +303,6 @@ describe('AdTrueBidAdapter', function () {
expect(data.site.domain).to.be.a('string'); // domain should be set
expect(data.site.publisher.id).to.equal(bidRequests[0].params.publisherId); // publisher Id
expect(data.ext.wrapper.transactionId).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.source.tid).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.imp[0].id).to.equal(bidRequests[0].bidId); // Prebid bid id is passed as id
expect(data.imp[0].bidfloor).to.equal(parseFloat(bidRequests[0].params.reserve)); // reverse
expect(data.imp[0].tagid).to.equal(bidRequests[0].params.zoneId); // zoneId
Expand All @@ -324,7 +322,6 @@ describe('AdTrueBidAdapter', function () {
expect(data.site.domain).to.be.a('string'); // domain should be set
expect(data.site.publisher.id).to.equal(bidRequests[0].params.publisherId); // publisher Id
expect(data.ext.wrapper.transactionId).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.source.tid).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.imp[0].id).to.equal(bidRequests[0].bidId); // Prebid bid id is passed as id
expect(data.imp[0].bidfloor).to.equal(parseFloat(bidRequests[0].params.reserve)); // reverse
expect(data.imp[0].tagid).to.equal(bidRequests[0].params.zoneId); // zoneId
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/improvedigitalBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('Improve Digital Adapter Tests', function () {
expect(payload.tmax).not.to.exist;
expect(payload.regs).to.not.exist;
expect(payload.schain).to.not.exist;
sinon.assert.match(payload.source, {tid: 'f183e871-fbed-45f0-a427-c8a63c4c01eb'})
sinon.assert.match(payload.source, {tid: '192721e36a0239'})
expect(payload.device).to.be.an('object');
expect(payload.user).to.not.exist;
sinon.assert.match(payload.imp, [
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/luponmediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe('luponmediaBidAdapter', function () {
let dynRes = JSON.parse(requests.data);
expect(requests.url).to.equal(ENDPOINT_URL);
expect(requests.method).to.equal('POST');
expect(requests.data).to.equal('{"id":"585d96a5-bd93-4a89-b8ea-0f546f3aaa82","test":0,"source":{"tid":"585d96a5-bd93-4a89-b8ea-0f546f3aaa82","ext":{"schain":{"ver":"1.0","complete":1,"nodes":[{"asi":"novi.ba","sid":"199424","hp":1}]}}},"tmax":1500,"imp":[{"id":"268a30af10dd6f","secure":1,"ext":{"luponmedia":{"siteId":303522,"keyId":"4o2c4"}},"banner":{"format":[{"w":300,"h":250}]}}],"ext":{"prebid":{"targeting":{"includewinners":true,"includebidderkeys":false}}},"user":{"id":"' + dynRes.user.id + '","buyeruid":"8d8b16cb-1383-4a0f-b4bb-0be28464d974"},"site":{"page":"https://novi.ba/clanak/176067/fast-car-beginner-s-guide-to-tuning-turbo-engines"}}');
expect(requests.data).to.equal('{"id":"585d96a5-bd93-4a89-b8ea-0f546f3aaa82","test":0,"source":{"tid":"7376c117-b7aa-49f5-a661-488543deeefd","ext":{"schain":{"ver":"1.0","complete":1,"nodes":[{"asi":"novi.ba","sid":"199424","hp":1}]}}},"tmax":1500,"imp":[{"id":"268a30af10dd6f","secure":1,"ext":{"luponmedia":{"siteId":303522,"keyId":"4o2c4"}},"banner":{"format":[{"w":300,"h":250}]}}],"ext":{"prebid":{"targeting":{"includewinners":true,"includebidderkeys":false}}},"user":{"id":"' + dynRes.user.id + '","buyeruid":"8d8b16cb-1383-4a0f-b4bb-0be28464d974"},"site":{"page":"https://novi.ba/clanak/176067/fast-car-beginner-s-guide-to-tuning-turbo-engines"}}');
});
});

Expand Down
1 change: 0 additions & 1 deletion test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,6 @@ describe('PubMatic adapter', function () {
expect(data.user.geo.lon).to.equal(parseFloat(bidRequests[0].params.lon)); // Lognitude
expect(data.ext.wrapper.wv).to.equal($$REPO_AND_VERSION$$); // Wrapper Version
expect(data.ext.wrapper.transactionId).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.source.tid).to.equal(bidRequests[0].transactionId); // Prebid TransactionId
expect(data.ext.wrapper.wiid).to.equal(bidRequests[0].params.wiid); // OpenWrap: Wrapper Impression ID
expect(data.ext.wrapper.profile).to.equal(parseInt(bidRequests[0].params.profId)); // OpenWrap: Wrapper Profile ID
expect(data.ext.wrapper.version).to.equal(parseInt(bidRequests[0].params.verId)); // OpenWrap: Wrapper Profile Version ID
Expand Down
8 changes: 4 additions & 4 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ describe('the rubicon adapter', function () {
'rp_secure': /[01]/,
'rand': '0.1',
'tk_flint': INTEGRATION,
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_source.tid': 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
'kw': 'a,b,c',
Expand Down Expand Up @@ -618,7 +618,7 @@ describe('the rubicon adapter', function () {
'rp_secure': /[01]/,
'rand': '0.1',
'tk_flint': INTEGRATION,
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_source.tid': 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a',
'x_imp.ext.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
Expand Down Expand Up @@ -970,7 +970,7 @@ describe('the rubicon adapter', function () {
'rp_secure': /[01]/,
'rand': '0.1',
'tk_flint': INTEGRATION,
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_source.tid': 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
'kw': 'a,b,c',
Expand Down Expand Up @@ -2286,7 +2286,7 @@ describe('the rubicon adapter', function () {
'p_pos': 'atf',
'rp_secure': /[01]/,
'tk_flint': INTEGRATION,
'x_source.tid': 'd45dd707-a418-42ec-b8a7-b70a6c6fab0b',
'x_source.tid': 'c45dd708-a418-42ec-b8a7-b70a6c6fab0a',
'p_screen_res': /\d+x\d+/,
'tk_user_key': '12346',
'kw': 'a,b,c',
Expand Down