From 28e8b7cc854046151012f3f07f994821fa5dbf00 Mon Sep 17 00:00:00 2001 From: Vadym Shatov Date: Fri, 6 Jun 2025 22:38:50 +0300 Subject: [PATCH 1/3] Adtelligent Bid Adapter: Add support for age consent --- modules/adtelligentBidAdapter.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index 2a27fb2a23f..a3de9495c29 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -69,6 +69,7 @@ export const spec = { const chunkSize = deepAccess(adapterSettings, 'chunkSize', 10); const { tag, bids } = bidToTag(bidRequests, adapterRequest); const bidChunks = chunk(bids, chunkSize); + return _map(bidChunks, (bids) => { return { data: Object.assign({}, tag, { BidRequests: bids }), @@ -129,10 +130,10 @@ function parseRTBResponse(serverResponse, adapterRequest) { function bidToTag(bidRequests, adapterRequest) { // start publisher env const tag = createTag(bidRequests, adapterRequest); + if (window.adtDmp && window.adtDmp.ready) { tag.DMPId = window.adtDmp.getUID(); } - if (adapterRequest.gppConsent) { tag.GPP = adapterRequest.gppConsent.gppString; tag.GPPSid = adapterRequest.gppConsent.applicableSections?.toString(); @@ -140,12 +141,16 @@ function bidToTag(bidRequests, adapterRequest) { tag.GPP = adapterRequest.ortb2.regs.gpp; tag.GPPSid = adapterRequest.ortb2.regs.gpp_sid; } + if (deepAccess(adapterRequest, 'ortb2.user.ext.age_consent')) { + tag.AgeConsent = adapterRequest.ortb2.user.ext.age_consent; + } // end publisher env const bids = []; for (let i = 0, length = bidRequests.length; i < length; i++) { const bid = prepareBidRequests(bidRequests[i]); + bids.push(bid); } @@ -176,10 +181,12 @@ function prepareBidRequests(bidReq) { } if (mediaType === VIDEO) { const context = deepAccess(bidReq, 'mediaTypes.video.context'); + if (context === ADPOD) { bidReqParams.Adpod = deepAccess(bidReq, 'mediaTypes.video'); } } + return bidReqParams; } From fa3a54026f70559282acdb8ebd290d57704b5b13 Mon Sep 17 00:00:00 2001 From: Vadym Shatov Date: Fri, 13 Jun 2025 10:42:15 +0300 Subject: [PATCH 2/3] Update Adtelligent Bid Adapter --- modules/adtelligentBidAdapter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index a3de9495c29..cd00f0ae136 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -141,8 +141,10 @@ function bidToTag(bidRequests, adapterRequest) { tag.GPP = adapterRequest.ortb2.regs.gpp; tag.GPPSid = adapterRequest.ortb2.regs.gpp_sid; } - if (deepAccess(adapterRequest, 'ortb2.user.ext.age_consent')) { - tag.AgeConsent = adapterRequest.ortb2.user.ext.age_consent; + const ageVerification = deepAccess(adapterRequest, 'ortb2.regs.ext.age_verification'); + + if (ageVerification) { + tag.AgeVerification = ageVerification; } // end publisher env From 8d6a582432ba1fbe4a6c3afe5763f603dbf2cdcd Mon Sep 17 00:00:00 2001 From: Vadym Shatov Date: Sat, 14 Jun 2025 13:35:19 +0300 Subject: [PATCH 3/3] Adtelligent Bid Adapter: Add unit test --- .../spec/modules/adtelligentBidAdapter_spec.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/spec/modules/adtelligentBidAdapter_spec.js b/test/spec/modules/adtelligentBidAdapter_spec.js index 05743da6f16..6533addcf08 100644 --- a/test/spec/modules/adtelligentBidAdapter_spec.js +++ b/test/spec/modules/adtelligentBidAdapter_spec.js @@ -144,6 +144,12 @@ const displayBidderRequest = { bids: [{ bidId: '2e41f65424c87c' }] }; +const ageVerificationData = { + id: "123456789123456789", + status: "accepted", + decisionDate: "2011-10-05T14:48:00.000Z" +}; + const displayBidderRequestWithConsents = { bidderCode: 'bidderCode', bids: [{ bidId: '2e41f65424c87c' }], @@ -155,7 +161,14 @@ const displayBidderRequestWithConsents = { gppString: 'abc12345234', applicableSections: [7, 8] }, - uspConsent: 'iHaveIt' + uspConsent: 'iHaveIt', + ortb2: { + regs: { + ext: { + age_verification: ageVerificationData + } + } + } }; const videoEqResponse = [{ @@ -379,6 +392,9 @@ describe('adtelligentBidAdapter', () => { it('sets UserId\'s', () => { expect(bidRequestWithPubSettingsData.UserIds).to.be.deep.equal(DISPLAY_REQUEST.userId); }) + it('sets AgeVerification', () => { + expect(bidRequestWithPubSettingsData.AgeVerification).to.deep.equal(ageVerificationData); + }); }) });