From 44f97aece137c0d419da03ff2649b02ee9eb7b20 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Laroche Date: Thu, 21 May 2026 09:22:30 -0400 Subject: [PATCH] Change key names for sessionDepth and pageAuctionsCount in Analytics prototype --- lib/addons/prototypes/analytics.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/addons/prototypes/analytics.js b/lib/addons/prototypes/analytics.js index d89c288e..b824116d 100644 --- a/lib/addons/prototypes/analytics.js +++ b/lib/addons/prototypes/analytics.js @@ -23,7 +23,7 @@ class OptablePrebidAnalytics { this.auctions = {}; this.maxAuctionDataSize = 20; - sessionStorage.optableSessionDepth = (Number(sessionStorage?.optableSessionDepth) || 0) + 1; + sessionStorage.optableSessionDepthIndex = (Number(sessionStorage?.optableSessionDepthIndex) || 0) + 1; this.log("OptablePrebidAnalytics initialized"); } @@ -103,7 +103,7 @@ class OptablePrebidAnalytics { async trackAuctionEnd(event, missed) { const { auctionId, timeout, bidderRequests = [], bidsReceived = [], noBids = [], timeoutBids = [] } = event; - window.optable.pageAuctionsCount = (Number(window.optable.pageAuctionsCount) || 0) + 1; + window.optable.pageAuctionIndex = (Number(window.optable.pageAuctionIndex) || 0) + 1; this.log(`Processing auction ${auctionId} with ${bidderRequests.length} bidder requests`); @@ -279,8 +279,8 @@ class OptablePrebidAnalytics { tenant: this.config.tenant, optableWrapperVersion: SDK_WRAPPER_VERSION, // eslint-disable-line no-undef prebidjsVersion: this.prebidInstance?.version || "unknown", - sessionDepth: sessionStorage?.optableSessionDepth || 1, - pageAuctionsCount: window.optable?.pageAuctionsCount || 1, + sessionDepth: sessionStorage?.optableSessionDepthIndex || 1, + pageAuctionsCount: window.optable?.pageAuctionIndex || 1, }; // Log summary with bid counts this.log(