Skip to content

Commit 4129fe3

Browse files
jordi-tappxJordi Arnau
andauthored
Feature: added obtention of gpid, divid and other information and adding tests (prebid#13624)
Co-authored-by: Jordi Arnau <jarnau@tappx.com>
1 parent 6368b6b commit 4129fe3

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed

modules/tappxBidAdapter.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BIDDER_CODE = 'tappx';
1515
const GVLID_CODE = 628;
1616
const TTL = 360;
1717
const CUR = 'USD';
18-
const TAPPX_BIDDER_VERSION = '0.1.3';
18+
const TAPPX_BIDDER_VERSION = '0.1.4';
1919
const TYPE_CNN = 'prebidjs';
2020
const LOG_PREFIX = '[TAPPX]: ';
2121
const VIDEO_SUPPORT = ['instream', 'outstream'];
@@ -398,6 +398,22 @@ function buildOneRequest(validBidRequests, bidderRequest) {
398398

399399
imp.ext = {};
400400
imp.ext.bidder = bidder;
401+
402+
const pbadslot = validBidRequests.ortb2Imp?.ext?.data?.pbadslot;
403+
const adslot = validBidRequests.ortb2Imp?.ext?.data?.adserver?.adslot;
404+
const adserverName = validBidRequests.ortb2Imp?.ext?.data?.adserver?.name;
405+
const gpid = validBidRequests.ortb2Imp?.ext?.gpid;
406+
const divid = validBidRequests.ortb2Imp?.ext?.divid;
407+
408+
if (pbadslot || adslot || adserverName) imp.ext.data = {};
409+
if (adslot || adserverName) imp.ext.data.adserver = {};
410+
411+
if (gpid) imp.ext.gpid = gpid;
412+
if (pbadslot) imp.ext.data.pbadslot = pbadslot;
413+
if (adslot) imp.ext.data.adserver.adslot = adslot;
414+
if (adserverName) imp.ext.data.adserver.name = adserverName;
415+
if (divid) imp.ext.divid = divid;
416+
401417
// < Imp object
402418

403419
// > Device object

0 commit comments

Comments
 (0)