Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistroScale Bid Adapter: bidder enhancement #9641

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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