Skip to content

Commit

Permalink
UPDATE: replace the way to get the hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
marc_tappx committed Feb 5, 2021
1 parent 94e2357 commit 31d23ee
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/tappxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const spec = {
const TAPPXKEY = getParameters(validBidRequests, 'params.tappxkey');
const BIDFLOOR = getParameters(validBidRequests, 'params.bidfloor');
const bannerMediaType = getParameters(validBidRequests, 'mediaTypes.banner');
const { refererInfo } = bidderRequest;

let requests = [];
let payload = {};
Expand All @@ -63,11 +64,11 @@ export const spec = {
api[0] = getParameters(validBidRequests, 'params.api') ? getParameters(validBidRequests, 'params.api') : [3, 5];
} else {
let site = {};
site.name = window.location.hostname;
site.bundle = window.location.hostname;
site.domain = window.location.hostname;
publisher.name = window.location.hostname;
publisher.domain = window.location.hostname;
site.name = (bidderRequest && refererInfo) ? utils.parseUrl(refererInfo.referer).hostname : window.location.hostname;
site.bundle = (bidderRequest && refererInfo) ? utils.parseUrl(refererInfo.referer).hostname : window.location.hostname;
site.domain = (bidderRequest && refererInfo) ? utils.parseUrl(refererInfo.referer).hostname : window.location.hostname;
publisher.name = (bidderRequest && refererInfo) ? utils.parseUrl(refererInfo.referer).hostname : window.location.hostname;
publisher.domain = (bidderRequest && refererInfo) ? utils.parseUrl(refererInfo.referer).hostname : window.location.hostname;
tagid = `${site.name}_typeAdBanVid_${getOs()}`;
payload.site = site;
}
Expand Down

0 comments on commit 31d23ee

Please sign in to comment.