Skip to content

Commit

Permalink
add docReferrer (#7551)
Browse files Browse the repository at this point in the history
Co-authored-by: atkachov <atkachov@admixer.ua>
  • Loading branch information
AdmixerTech and altkachov authored Oct 13, 2021
1 parent c514d20 commit 719523b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/admixerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,20 @@ export const spec = {
* Make a server request from the list of BidRequests.
*/
buildRequests: function (validRequest, bidderRequest) {
let w;
let docRef;
do {
w = w ? w.parent : window;
try {
docRef = w.document.referrer;
} catch (e) {
break;
}
} while (w !== window.top);
const payload = {
imps: [],
ortb2: config.getConfig('ortb2'),
docReferrer: docRef,
};
let endpointUrl;
if (bidderRequest) {
Expand Down

0 comments on commit 719523b

Please sign in to comment.