Skip to content

Commit

Permalink
convert bidders: hybrid
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 20, 2022
1 parent 561b10b commit 535ff28
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions modules/h12mediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ export const spec = {
gdpr_cs: deepAccess(bidderRequest, 'gdprConsent.consentString', ''),
usp: !!deepAccess(bidderRequest, 'uspConsent', false),
usp_cs: deepAccess(bidderRequest, 'uspConsent', ''),
topLevelUrl: deepAccess(bidderRequest, 'refererInfo.referer', ''),
refererUrl: windowTop.document.referrer,
topLevelUrl: deepAccess(bidderRequest, 'refererInfo.page', ''),
// TODO: does the fallback make sense here?
refererUrl: deepAccess(bidderRequest, 'refererInfo.ref', window.document.referrer),
isiframe,
version: '$prebid.version$',
ExtUserIDs: bidRequest.userId,
Expand Down
1 change: 1 addition & 0 deletions modules/hadronAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var pageView = {
timezoneOffset: new Date().getTimezoneOffset(),
language: window.navigator.language,
vendor: window.navigator.vendor,
// TODO: this will throw when cross-origin; should probably look at refererInfo instead
pageUrl: window.top.location.href,
screenWidth: x,
screenHeight: y
Expand Down
3 changes: 2 additions & 1 deletion modules/hybridBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ export const spec = {
*/
buildRequests(validBidRequests, bidderRequest) {
const payload = {
url: bidderRequest.refererInfo.referer,
// TODO: is 'page' the right value here?
url: bidderRequest.refererInfo.page,
cmp: !!bidderRequest.gdprConsent,
trafficType: TRAFFIC_TYPE_WEB,
bidRequests: buildBidRequests(validBidRequests)
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/hybridBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function getSlotConfigs(mediaTypes, params) {
describe('Hybrid.ai Adapter', function() {
const PLACE_ID = '5af45ad34d506ee7acad0c26';
const bidderRequest = {
refererInfo: { referer: 'referer' }
refererInfo: { page: 'referer' }
}
const bannerMandatoryParams = {
placeId: PLACE_ID,
Expand Down

0 comments on commit 535ff28

Please sign in to comment.