From d17ba4e8b070b95beae8177adba79a0949619897 Mon Sep 17 00:00:00 2001 From: Filipe Neves Date: Tue, 8 Oct 2024 07:16:14 +0200 Subject: [PATCH 1/6] Updated bid adapter to log errors --- modules/impactifyBidAdapter.js | 16 +++++++++++++++- modules/impactifyBidAdapter.md | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/impactifyBidAdapter.js b/modules/impactifyBidAdapter.js index ea446bd150d..5d78f8eff6c 100644 --- a/modules/impactifyBidAdapter.js +++ b/modules/impactifyBidAdapter.js @@ -21,6 +21,7 @@ const DEFAULT_VIDEO_WIDTH = 640; const DEFAULT_VIDEO_HEIGHT = 360; const ORIGIN = 'https://sonic.impactify.media'; const LOGGER_URI = 'https://logger.impactify.media'; +const LOGGER_JS_URI = 'https://log.impactify.it' const AUCTION_URI = '/bidder'; const COOKIE_SYNC_URI = '/static/cookie_sync.html'; const GVL_ID = 606; @@ -389,6 +390,19 @@ export const spec = { }); return true; - } + }, + + /** + * Register bidder specific code, which will execute if the bid request failed + * @param {*} param0 + */ + onBidderError: function ({ error, bidderRequest }) { + ajax(`${LOGGER_JS_URI}/logger`, null, JSON.stringify({ error, bidderRequest }), { + method: 'POST', + contentType: 'application/json' + }); + + return true; + }, }; registerBidder(spec); diff --git a/modules/impactifyBidAdapter.md b/modules/impactifyBidAdapter.md index de3373395dc..e08f2f3ce01 100644 --- a/modules/impactifyBidAdapter.md +++ b/modules/impactifyBidAdapter.md @@ -3,7 +3,7 @@ ``` Module Name: Impactify Bidder Adapter Module Type: Bidder Adapter -Maintainer: thomas.destefano@impactify.io +Maintainer: programmatic@impactify.io ``` # Description From d3ef9f3094edfea4b41a9e6dc37282a8848af771 Mon Sep 17 00:00:00 2001 From: Filipe Neves Date: Wed, 26 Nov 2025 10:47:14 +0100 Subject: [PATCH 2/6] Remove onBidderError function and LOGGER_JS_URI Removed unused onBidderError function and LOGGER_JS_URI constant. --- modules/impactifyBidAdapter.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/modules/impactifyBidAdapter.js b/modules/impactifyBidAdapter.js index 9819a1587e9..2121742dac7 100644 --- a/modules/impactifyBidAdapter.js +++ b/modules/impactifyBidAdapter.js @@ -22,7 +22,6 @@ const DEFAULT_VIDEO_WIDTH = 640; const DEFAULT_VIDEO_HEIGHT = 360; const ORIGIN = 'https://sonic.impactify.media'; const LOGGER_URI = 'https://logger.impactify.media'; -const LOGGER_JS_URI = 'https://log.impactify.it' const AUCTION_URI = '/bidder'; const COOKIE_SYNC_URI = '/static/cookie_sync.html'; const GVL_ID = 606; @@ -387,18 +386,6 @@ export const spec = { return true; }, - - /** - * Register bidder specific code, which will execute if the bid request failed - * @param {*} param0 - */ - onBidderError: function ({ error, bidderRequest }) { - ajax(`${LOGGER_JS_URI}/logger`, null, JSON.stringify({ error, bidderRequest }), { - method: 'POST', - contentType: 'application/json' - }); - - return true; - }, + }; registerBidder(spec); From 0aa1223b4369c2b31092c129a52f80357012c9ef Mon Sep 17 00:00:00 2001 From: Filipe Neves Date: Wed, 26 Nov 2025 10:59:42 +0100 Subject: [PATCH 3/6] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- modules/impactifyBidAdapter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/impactifyBidAdapter.js b/modules/impactifyBidAdapter.js index 2121742dac7..49ffe99245d 100644 --- a/modules/impactifyBidAdapter.js +++ b/modules/impactifyBidAdapter.js @@ -386,6 +386,5 @@ export const spec = { return true; }, - }; registerBidder(spec); From 16ca8c7ce9754ea48f96928d07ae983bc0a2a948 Mon Sep 17 00:00:00 2001 From: Abdou <40374175+disparate1@users.noreply.github.com> Date: Mon, 20 Apr 2026 20:06:51 +0200 Subject: [PATCH 4/6] Fix mediatypes --- modules/impactifyBidAdapter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/impactifyBidAdapter.js b/modules/impactifyBidAdapter.js index 633c92a774d..8d114ca41d6 100644 --- a/modules/impactifyBidAdapter.js +++ b/modules/impactifyBidAdapter.js @@ -403,6 +403,7 @@ export const spec = { .filter((bid) => bid.price > 0) .map((bid) => { const isPlayer = impMap[bid.impid]?.ext?.impactify?.format === 'player'; + const mediaType = bid?.mtype === 2 ? 'video' : 'banner'; return { id: bid.id, requestId: bid.impid, @@ -413,6 +414,7 @@ export const spec = { height: bid.h || 0, ttl: 300, creativeId: bid.crid || 0, + mediaType: mediaType, meta: { advertiserDomains: bid.adomain && bid.adomain.length ? bid.adomain : [], @@ -420,7 +422,6 @@ export const spec = { ...(isPlayer ? { - mediaType: "video", vastUrl: bid.ext?.vast_url, vastXml: bid.adm, } From 5d3cde51cad06085b56dcd44142c91c35e55863b Mon Sep 17 00:00:00 2001 From: Abdou <40374175+disparate1@users.noreply.github.com> Date: Mon, 20 Apr 2026 20:07:26 +0200 Subject: [PATCH 5/6] Add banner test --- test/spec/modules/impactifyBidAdapter_spec.js | 57 +++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/test/spec/modules/impactifyBidAdapter_spec.js b/test/spec/modules/impactifyBidAdapter_spec.js index a977361ea76..ee641f29ac3 100644 --- a/test/spec/modules/impactifyBidAdapter_spec.js +++ b/test/spec/modules/impactifyBidAdapter_spec.js @@ -336,6 +336,7 @@ describe('ImpactifyAdapter', function () { id: '65820304700829014', impid: '462c08f20d428', price: 3.40, + mtype: 2, adm: '', adid: '97517771', iurl: 'https://fra1-ib.adnxs.com/cr?id=97517771', @@ -343,10 +344,10 @@ describe('ImpactifyAdapter', function () { crid: '97517771', w: 1, h: 1, - meta: { 'advertiserDomains': ['testdomain.com'] }, + adomain: ['testdomain.com'], ext: { prebid: { - 'type': 'video' + type: 'video' }, bidder: { prebid: { @@ -406,7 +407,8 @@ describe('ImpactifyAdapter', function () { } }, ] - } + }; + const expectedResponse = [ { id: '65820304700829014', @@ -417,7 +419,8 @@ describe('ImpactifyAdapter', function () { ad: '', width: 1, height: 1, - meta: { 'advertiserDomains': ['testdomain.com'] }, + mediaType: 'video', + meta: { advertiserDomains: ['testdomain.com'] }, ttl: 300, creativeId: '97517771' } @@ -448,6 +451,7 @@ describe('ImpactifyAdapter', function () { id: 'bid-1', impid: 'imp-1', price: 2.5, + mtype: 2, ext: { vast_url: 'https://example.com/vast.xml' }, @@ -467,6 +471,51 @@ describe('ImpactifyAdapter', function () { expect(result[0].vastXml).to.equal('fallback'); expect(result[0]).to.not.have.property('ad'); }); + + it('should map banner responses to banner bids', function () { + const bidRequest = { + data: JSON.stringify({ + imp: [{ + id: 'imp-banner-1', + ext: { + impactify: { + format: 'display' + } + } + }] + }) + }; + + const serverResponse = { + body: { + cur: 'USD', + seatbid: [{ + bid: [{ + id: 'bid-banner-1', + impid: 'imp-banner-1', + price: 1.75, + mtype: 1, + adm: '
banner creative
', + crid: 'creative-banner-1', + w: 300, + h: 250, + adomain: ['advertiser.com'] + }] + }] + } + }; + + const result = spec.interpretResponse(serverResponse, bidRequest); + + expect(result).to.have.length(1); + expect(result[0].mediaType).to.equal('banner'); + expect(result[0].ad).to.equal('
banner creative
'); + expect(result[0]).to.not.have.property('vastUrl'); + expect(result[0]).to.not.have.property('vastXml'); + expect(result[0].meta).to.deep.equal({ + advertiserDomains: ['advertiser.com'] + }); + }); }); describe('getUserSyncs', function () { const videoBidRequests = [ From b978168410603c5946402bbe0b3fdce226da6842 Mon Sep 17 00:00:00 2001 From: Abdou <40374175+disparate1@users.noreply.github.com> Date: Mon, 20 Apr 2026 22:33:53 +0200 Subject: [PATCH 6/6] Add mediaType fallbacks --- modules/impactifyBidAdapter.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/impactifyBidAdapter.js b/modules/impactifyBidAdapter.js index 8d114ca41d6..0307e26ac7e 100644 --- a/modules/impactifyBidAdapter.js +++ b/modules/impactifyBidAdapter.js @@ -403,7 +403,18 @@ export const spec = { .filter((bid) => bid.price > 0) .map((bid) => { const isPlayer = impMap[bid.impid]?.ext?.impactify?.format === 'player'; - const mediaType = bid?.mtype === 2 ? 'video' : 'banner'; + const isVideo = !!impMap[bid.impid]?.video; + let mediaType; + if (bid?.mtype === 2) { + mediaType = 'video'; + } else if (bid?.mtype === 1) { + mediaType = 'banner'; + } else if (isPlayer || isVideo) { + mediaType = 'video'; + } else { + mediaType = 'banner'; + } + return { id: bid.id, requestId: bid.impid,