Skip to content

Commit

Permalink
convert bidders: bliink
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed May 20, 2022
1 parent b29945e commit 94337ef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/bizzclickBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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/bliinkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const buildRequests = (_, bidderRequest) => {
if (!bidderRequest) return null

let data = {
pageUrl: bidderRequest.refererInfo.referer,
pageUrl: bidderRequest.refererInfo.page,
pageDescription: getMetaValue(META_DESCRIPTION),
keywords: getKeywords().join(','),
gdpr: false,
Expand All @@ -184,7 +184,8 @@ export const buildRequests = (_, bidderRequest) => {
bidderRequestId: bidderRequest.bidderRequestId,
bidderCode: bidderRequest.bidderCode,
bids: bidderRequest.bids,
refererInfo: bidderRequest.refererInfo,
// TODO: please do not send internal data structures over the network
refererInfo: bidderRequest.refererInfo.legacy,
}

if (bidderRequest.gdprConsent) {
Expand Down
17 changes: 10 additions & 7 deletions test/spec/modules/bliinkBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ const getConfigBuildRequest = (placement) => {
bidderCode: 'bliink',
bids: [getConfigBid(placement)],
refererInfo: {
canonicalUrl: null,
isAmp: false,
numIframes: 0,
reachedTop: true,
referer: 'http://localhost:9999/integrationExamples/gpt/bliink-adapter.html?pbjs_debug=true',
page: 'http://localhost:9999/integrationExamples/gpt/bliink-adapter.html?pbjs_debug=true',
legacy: {
canonicalUrl: null,
isAmp: false,
numIframes: 0,
reachedTop: true,
referer: 'http://localhost:9999/integrationExamples/gpt/bliink-adapter.html?pbjs_debug=true',
}
},
}

Expand Down Expand Up @@ -474,7 +477,7 @@ const testsBuildRequests = [
bidderRequestId: getConfigBuildRequest('banner').bidderRequestId,
bidderCode: getConfigBuildRequest('banner').bidderCode,
bids: getConfigBuildRequest('banner').bids,
refererInfo: getConfigBuildRequest('banner').refererInfo
refererInfo: getConfigBuildRequest('banner').refererInfo.legacy
},
data: {
gdpr: false,
Expand Down Expand Up @@ -505,7 +508,7 @@ const testsBuildRequests = [
bidderRequestId: getConfigBuildRequest('banner').bidderRequestId,
bidderCode: getConfigBuildRequest('banner').bidderCode,
bids: getConfigBuildRequest('banner').bids,
refererInfo: getConfigBuildRequest('banner').refererInfo
refererInfo: getConfigBuildRequest('banner').refererInfo.legacy
},
data: {
gdpr: true,
Expand Down

0 comments on commit 94337ef

Please sign in to comment.