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

Zeta Bid Adapter: update to endpoint #6697

Merged
merged 4 commits into from
May 5, 2021
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
8 changes: 4 additions & 4 deletions modules/zetaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ export const spec = {
badv: params.badv,
bapp: params.bapp,
source: params.source ? params.source : {},
ext: {
definerId: params.definerId
}
ext: params.ext ? params.ext : {}
};

payload.device.ua = navigator.userAgent;
payload.site.page = bidderRequest.refererInfo.referer;
payload.site.mobile = /(ios|ipod|ipad|iphone|android)/i.test(navigator.userAgent) ? 1 : 0;
payload.ext.definerId = params.definerId;

if (params.test) {
payload.test = params.test;
Expand All @@ -113,9 +112,10 @@ export const spec = {
}
};
}
const postUrl = params.definerId !== '0' ? ENDPOINT_URL.concat('/', params.definerId) : ENDPOINT_URL;
return {
method: 'POST',
url: ENDPOINT_URL,
url: postUrl,
data: JSON.stringify(payload),
};
},
Expand Down
4 changes: 2 additions & 2 deletions modules/zetaBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Module that connects to Zeta's demand sources
device: {
ip: '111.222.33.44',
geo: {
country: "USA"
country: 'USA'
}
},
definerId: 1,
definerId: '0',
test: 1
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/zetaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Zeta Bid Adapter', function() {
}
},
refererInfo: {
referer: 'zetaglobal.com'
referer: 'testprebid.com'
},
params: {
placement: 12345,
Expand All @@ -24,7 +24,7 @@ describe('Zeta Bid Adapter', function() {
country: 'USA'
}
},
definerId: 1,
definerId: '0',
test: 1
}
}];
Expand Down