// START Log pbjs auction data googletag = window.googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(()=> { googletag.pubads().addEventListener("slotRequested", (event) => { const gptSlot = event.slot; const slot = $MMT.utils.getSlotFromElementId(gptSlot.getSlotElementId()); const targetingMap = slot.gptSlot?.getTargetingMap() || {}; const pbAuctionId = targetingMap['auction_id']?.toString(); const isFreshBid = pbAuctionId ? String(slot.headerBidding[slot.headerBidding.length-1]?.prebidAuction?.auctionId == pbAuctionId) : 'n/a'; const hb = slot.headerBidding?.at(-1)?.prebidAuction; const dataLog = { "b": $MMT.browser, "d": $MMT.deviceType, "a": pbAuctionId, "f": isFreshBid, "f.r": [isFreshBid, String(slot.parent?.stats?.refreshCount)].join('_'), "n": slot.num, "r": slot.parent?.stats?.refreshCount, "w": targetingMap['max_bid']?.[0], "p": targetingMap['hb_bidder']?.[0], "c": targetingMap['hb_pb']?.[0], "b.r": hb?.bidsReceived?.map(b=>({"b": b.bidderCode, "c": b.pbHg, "t":b.ttl, "f": pbAuctionId ? +(b.auctionId == pbAuctionId) : -1})), "b.n": hb?.noBids?.map(b=>({"b": b.bidder, "r": b.bidderRequestsCount, "w":b.bidderWinsCount })), "b.x": hb?.bidsRejected?.map(b=>({"b":b.bidder,"x":b.rejectionReason})) } if (slot.adUnitPath){ const session = $MMT.analytics.session; const url = `https://imps.monu.delivery/mmt.gif?s=${session}&a=s.r.e&u=${slot.adUnitPath.split('/').at(-1)}_${slot.num}&d=${encodeURIComponent(btoa(JSON.stringify(dataLog)))}` fetch(url, { "method": "HEAD", "mode": "no-cors", "keepalive":true, "cache-control": "no-store" }) } }); }); // END Log pbjs auction data