Skip to content

Commit

Permalink
convert bidders: adnuntius
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 18, 2022
1 parent c614eca commit 70305f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/admanBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const spec = {
let winTop = window;
let location;
try {
location = new URL(bidderRequest.refererInfo.referer)
location = new URL(bidderRequest.refererInfo.page)
winTop = window.top;
} catch (e) {
location = winTop.location;
Expand Down
5 changes: 3 additions & 2 deletions modules/admixerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export const spec = {
if (bidderRequest) {
const {bidderCode} = bidderRequest;
endpointUrl = config.getConfig(`${bidderCode}.endpoint_url`);
if (bidderRequest.refererInfo && bidderRequest.refererInfo.referer) {
payload.referrer = encodeURIComponent(bidderRequest.refererInfo.referer);
// TODO: is 'page' the right value here?
if (bidderRequest.refererInfo?.page) {
payload.referrer = encodeURIComponent(bidderRequest.refererInfo.page);
}
if (bidderRequest.gdprConsent) {
payload.gdprConsent = {
Expand Down
2 changes: 1 addition & 1 deletion modules/adnuntiusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const spec = {

networks[network] = networks[network] || {};
networks[network].adUnits = networks[network].adUnits || [];
if (bidderRequest && bidderRequest.refererInfo) networks[network].context = bidderRequest.refererInfo.referer;
if (bidderRequest && bidderRequest.refererInfo) networks[network].context = bidderRequest.refererInfo.page;
if (adnMeta) networks[network].metaData = adnMeta;
networks[network].adUnits.push({ ...targeting, auId: bid.params.auId, targetId: bid.bidId });
}
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/admixerBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('AdmixerAdapter', function () {
let bidderRequest = {
bidderCode: BIDDER_CODE,
refererInfo: {
referer: 'https://example.com'
page: 'https://example.com'
}
};

Expand Down

0 comments on commit 70305f4

Please sign in to comment.