From d92a5844d67dd4215fb66890dec49d818c3c03d0 Mon Sep 17 00:00:00 2001 From: robertrmartinez Date: Thu, 19 Jan 2023 12:37:46 -0800 Subject: [PATCH] only count not sent ones duh --- modules/magniteAnalyticsAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/magniteAnalyticsAdapter.js b/modules/magniteAnalyticsAdapter.js index fdd33dffc6a..22cb76cd4bb 100644 --- a/modules/magniteAnalyticsAdapter.js +++ b/modules/magniteAnalyticsAdapter.js @@ -655,7 +655,7 @@ magniteAdapter.onDataDeletionRequest = function () { // send a beacon to see how many times this happens window.addEventListener("beforeunload", function () { - const pendingAuctions = Object.keys(cache.auctions).length; + const pendingAuctions = Object.keys(cache.auctions).filter(aid => !cache.auctions[aid].sent).length; const pendingEvents = Object.keys(cache.pendingEvents).length && Object.keys(cache.pendingEvents).reduce((accum, eventName) => { accum[eventName] = cache.pendingEvents[eventName].length; return accum;