Skip to content

Commit

Permalink
Convert conversant params for prebid server (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
pycnvr authored and Matt Kendall committed Nov 29, 2017
1 parent ff9cd38 commit 49b6c6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/conversantBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const spec = {
*/
buildRequests: function(validBidRequests) {
const loc = utils.getTopWindowLocation();
const page = loc.pathname + loc.search + loc.hash;
const page = loc.href;
const isPageSecure = (loc.protocol === 'https:') ? 1 : 0;
let siteId = '';
let requestId = '';
Expand Down
5 changes: 5 additions & 0 deletions modules/prebidServerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ const paramTypes = {
'cp': tryConvertNumber,
'ct': tryConvertNumber
},
'conversant': {
'site_id': tryConvertString,
'secure': tryConvertNumber,
'mobile': tryConvertNumber
},
};

let _cookiesQueued = false;
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/conversantBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('Conversant adapter tests', function() {
expect(payload.site).to.have.property('id', siteId);
expect(payload.site).to.have.property('mobile').that.is.oneOf([0, 1]);
const loc = utils.getTopWindowLocation();
const page = loc.pathname + loc.search + loc.hash;
const page = loc.href;
expect(payload.site).to.have.property('page', page);

expect(payload).to.have.property('device');
Expand Down

0 comments on commit 49b6c6c

Please sign in to comment.