Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert conversant params for prebid server #1863

Merged
merged 1 commit into from
Nov 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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