From 431283544d15cac84f3060d259ee3abe84f36c02 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 14 Feb 2018 10:12:08 -0700 Subject: [PATCH 1/2] Send 'iv' param if present --- modules/sovrnBidAdapter.js | 3 +++ test/spec/modules/sovrnBidAdapter_spec.js | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/modules/sovrnBidAdapter.js b/modules/sovrnBidAdapter.js index bf2f7f7b777..6efb4d8a126 100644 --- a/modules/sovrnBidAdapter.js +++ b/modules/sovrnBidAdapter.js @@ -23,6 +23,7 @@ export const spec = { */ buildRequests: function(bidReqs) { let sovrnImps = []; + let iv; utils._each(bidReqs, function (bid) { sovrnImps.push({ id: bid.bidId, @@ -30,6 +31,7 @@ export const spec = { tagid: utils.getBidIdParameter('tagid', bid.params), bidfloor: utils.getBidIdParameter('bidfloor', bid.params) }); + iv = iv || utils.getBidIdParameter('iv', bid.params); }); const sovrnBidReq = { id: utils.getUniqueIdentifierStr(), @@ -39,6 +41,7 @@ export const spec = { page: window.location.pathname + location.search + location.hash } }; + if (iv) sovrnBidReq.iv = iv; return { method: 'POST', url: `//ap.lijit.com/rtb/bid?src=${REPO_AND_VERSION}`, diff --git a/test/spec/modules/sovrnBidAdapter_spec.js b/test/spec/modules/sovrnBidAdapter_spec.js index c4eadd02738..2ecc6a24d7a 100644 --- a/test/spec/modules/sovrnBidAdapter_spec.js +++ b/test/spec/modules/sovrnBidAdapter_spec.js @@ -63,6 +63,26 @@ describe('sovrnBidAdapter', function() { it('attaches source and version to endpoint URL as query params', () => { expect(request.url).to.equal(ENDPOINT) }); + + it('sends \'iv\' as query param if present', () => { + const ivBidRequests = [{ + 'bidder': 'sovrn', + 'params': { + 'tagid': '403370', + 'iv': 'vet' + }, + 'adUnitCode': 'adunit-code', + 'sizes': [ + [300, 250] + ], + 'bidId': '30b31c1838de1e', + 'bidderRequestId': '22edbae2733bf6', + 'auctionId': '1d1a030790a475' + }]; + const request = spec.buildRequests(ivBidRequests); + + expect(request.data).to.contain('"iv":"vet"') + }) }); describe('interpretResponse', () => { From 44b2f94022b5664939bfd0dd534e1203b63330db Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 14 Feb 2018 11:44:50 -0700 Subject: [PATCH 2/2] `page` field in `site` object sends full url --- modules/sovrnBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sovrnBidAdapter.js b/modules/sovrnBidAdapter.js index 6efb4d8a126..e6668e26dcd 100644 --- a/modules/sovrnBidAdapter.js +++ b/modules/sovrnBidAdapter.js @@ -38,7 +38,7 @@ export const spec = { imp: sovrnImps, site: { domain: window.location.host, - page: window.location.pathname + location.search + location.hash + page: window.location.host + window.location.pathname + location.search + location.hash } }; if (iv) sovrnBidReq.iv = iv;