diff --git a/modules/sparteoBidAdapter.js b/modules/sparteoBidAdapter.js index 5649afd3946..2bb08707c85 100644 --- a/modules/sparteoBidAdapter.js +++ b/modules/sparteoBidAdapter.js @@ -24,12 +24,14 @@ const converter = ortbConverter({ request(buildRequest, imps, bidderRequest, context) { const request = buildRequest(imps, bidderRequest, context); + deepSetValue(request, 'site.publisher.ext.params.pbjsVersion', '$prebid.version$'); + if (bidderRequest.bids[0].params.networkId) { - deepSetValue(request, 'site.publisher.ext.params.networkId', bidderRequest.bids[0].params.networkId); + request.site.publisher.ext.params.networkId = bidderRequest.bids[0].params.networkId; } if (bidderRequest.bids[0].params.publisherId) { - deepSetValue(request, 'site.publisher.ext.params.publisherId', bidderRequest.bids[0].params.publisherId); + request.site.publisher.ext.params.publisherId = bidderRequest.bids[0].params.publisherId; } return request; diff --git a/test/spec/modules/sparteoBidAdapter_spec.js b/test/spec/modules/sparteoBidAdapter_spec.js index e0b7349cb92..c83559175e6 100644 --- a/test/spec/modules/sparteoBidAdapter_spec.js +++ b/test/spec/modules/sparteoBidAdapter_spec.js @@ -81,7 +81,8 @@ const VALID_REQUEST_BANNER = { 'publisher': { 'ext': { 'params': { - 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf' + 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf', + 'pbjsVersion': '$prebid.version$' } } } @@ -123,7 +124,8 @@ const VALID_REQUEST_VIDEO = { 'publisher': { 'ext': { 'params': { - 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf' + 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf', + 'pbjsVersion': '$prebid.version$' } } } @@ -183,7 +185,8 @@ const VALID_REQUEST = { 'publisher': { 'ext': { 'params': { - 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf' + 'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf', + 'pbjsVersion': '$prebid.version$' } } }