File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const BIDDER_CODE = 'tappx';
1616const GVLID_CODE = 628 ;
1717const TTL = 360 ;
1818const CUR = 'USD' ;
19- const TAPPX_BIDDER_VERSION = '0.1.4 ' ;
19+ const TAPPX_BIDDER_VERSION = '0.1.5 ' ;
2020const TYPE_CNN = 'prebidjs' ;
2121const LOG_PREFIX = '[TAPPX]: ' ;
2222const VIDEO_SUPPORT = [ 'instream' , 'outstream' ] ;
@@ -209,6 +209,7 @@ function interpretBid(serverBid, request) {
209209 if ( typeof serverBid . lurl !== 'undefined' ) { bidReturned . lurl = serverBid . lurl }
210210 if ( typeof serverBid . nurl !== 'undefined' ) { bidReturned . nurl = serverBid . nurl }
211211 if ( typeof serverBid . burl !== 'undefined' ) { bidReturned . burl = serverBid . burl }
212+ if ( typeof serverBid . adomain !== 'undefined' ) { bidReturned . adomain = serverBid . adomain }
212213
213214 if ( typeof request . bids ?. mediaTypes !== 'undefined' && typeof request . bids ?. mediaTypes . video !== 'undefined' ) {
214215 bidReturned . vastXml = serverBid . adm ;
@@ -231,7 +232,7 @@ function interpretBid(serverBid, request) {
231232 }
232233
233234 if ( typeof bidReturned . adomain !== 'undefined' || bidReturned . adomain !== null ) {
234- bidReturned . meta = { advertiserDomains : request . bids ? .adomain } ;
235+ bidReturned . meta = { advertiserDomains : bidReturned . adomain } ;
235236 }
236237
237238 return bidReturned ;
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ const c_SERVERRESPONSE_B = {
8181 cid : '01744fbb521e9fb10ffea926190effea' ,
8282 crid : 'a13cf884e66e7c660afec059c89d98b6' ,
8383 adomain : [
84+ 'adomain.com'
8485 ] ,
8586 } ,
8687 ] ,
@@ -112,6 +113,7 @@ const c_SERVERRESPONSE_V = {
112113 cid : '01744fbb521e9fb10ffea926190effea' ,
113114 crid : 'a13cf884e66e7c660afec059c89d98b6' ,
114115 adomain : [
116+ 'adomain.com'
115117 ] ,
116118 } ,
117119 ] ,
@@ -385,6 +387,16 @@ describe('Tappx bid adapter', function () {
385387 const bids = spec . interpretResponse ( emptyServerResponse , c_BIDDERREQUEST_B ) ;
386388 expect ( bids ) . to . have . lengthOf ( 0 ) ;
387389 } ) ;
390+
391+ it ( 'receive reponse with adomain' , function ( ) {
392+ const bids_B = spec . interpretResponse ( c_SERVERRESPONSE_B , c_BIDDERREQUEST_B ) ;
393+ const bid_B = bids_B [ 0 ] ;
394+ expect ( bid_B . meta . advertiserDomains ) . to . deep . equal ( [ 'adomain.com' ] ) ;
395+
396+ const bids_V = spec . interpretResponse ( c_SERVERRESPONSE_V , c_BIDDERREQUEST_V ) ;
397+ const bid_V = bids_V [ 0 ] ;
398+ expect ( bid_V . meta . advertiserDomains ) . to . deep . equal ( [ 'adomain.com' ] ) ;
399+ } ) ;
388400 } ) ;
389401
390402 /**
You can’t perform that action at this time.
0 commit comments