Skip to content

Commit

Permalink
convert bidders: brightcom
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 20, 2022
1 parent a04ad82 commit abd70f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/brightcomBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBidIdParameter, _each, isArray, getWindowTop, getUniqueIdentifierStr, parseUrl, deepSetValue, logError, logWarn, createTrackPixelHtml, getWindowSelf, isFn, isPlainObject } from '../src/utils.js';
import { getBidIdParameter, _each, isArray, getWindowTop, getUniqueIdentifierStr, deepSetValue, logError, logWarn, createTrackPixelHtml, getWindowSelf, isFn, isPlainObject } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';
import { config } from '../src/config.js';
Expand All @@ -19,7 +19,7 @@ function buildRequests(bidReqs, bidderRequest) {
try {
let referrer = '';
if (bidderRequest && bidderRequest.refererInfo) {
referrer = bidderRequest.refererInfo.referer;
referrer = bidderRequest.refererInfo.page;
}
const brightcomImps = [];
const publisherId = getBidIdParameter('publisherId', bidReqs[0].params);
Expand Down Expand Up @@ -56,7 +56,7 @@ function buildRequests(bidReqs, bidderRequest) {
id: getUniqueIdentifierStr(),
imp: brightcomImps,
site: {
domain: parseUrl(referrer).host,
domain: bidderRequest?.refererInfo?.domain || '',
page: referrer,
publisher: {
id: publisherId
Expand Down
3 changes: 2 additions & 1 deletion test/spec/modules/brightcomBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ describe('brightcomBidAdapter', function() {
gdprApplies: true
},
refererInfo: {
referer: 'http://example.com/page.html',
page: 'http://example.com/page.html',
domain: 'example.com',
}
};
bidderRequest.bids = bidRequests;
Expand Down

0 comments on commit abd70f9

Please sign in to comment.