Skip to content

Commit

Permalink
DistroScale bidder enhancement (prebid#9641)
Browse files Browse the repository at this point in the history
  • Loading branch information
duancg authored and jorgeluisrocha committed May 18, 2023
1 parent f91af77 commit b80f6fc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion modules/distroscaleBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,24 @@ export const spec = {
// TODO: does the fallback to window.location make sense?
var pageUrl = bidderRequest?.refererInfo?.page || window.location.href;

// check if dstag is already loaded in ancestry tree
var dsloaded = 0;
try {
var win = window;
while (true) {
if (win.vx.cs_loaded) {
dsloaded = 1;
}
if (win != win.parent) {
win = win.parent;
} else {
break;
}
}
} catch (error) {
// ignore exception
}

var payload = {
id: '' + (new Date()).getTime(),
at: AUCTION_TYPE,
Expand All @@ -149,7 +167,9 @@ export const spec = {
},
imp: [],
user: {},
ext: {}
ext: {
dsloaded: dsloaded
}
};

validBidRequests.forEach(b => {
Expand Down

0 comments on commit b80f6fc

Please sign in to comment.