Skip to content
Closed
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
8 changes: 4 additions & 4 deletions lib/addons/prebid/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class OptablePrebidAnalytics {
sessionStorage.removeItem(SESSION_SAMPLE_KEY);
}

sessionStorage.optableSessionDepth = (Number(sessionStorage?.optableSessionDepth) || 0) + 1;
sessionStorage.optableSessionDepthIndex = (Number(sessionStorage?.optableSessionDepthIndex) || 0) + 1;

this.isInitialized = true;

Expand Down Expand Up @@ -221,7 +221,7 @@ class OptablePrebidAnalytics {
this.log(`Processing auction ${auctionId} with ${bidderRequests.length} bidder requests`);

(window as any).optable = (window as any).optable || {};
(window as any).optable.pageAuctionsCount = (Number((window as any).optable.pageAuctionsCount) || 0) + 1;
(window as any).optable.pageAuctionIndex = (Number((window as any).optable.pageAuctionIndex) || 0) + 1;

// Build auction object with bidder requests and EID flags
const auction = {
Expand Down Expand Up @@ -524,8 +524,8 @@ class OptablePrebidAnalytics {
userAgent: Bowser.parse(window.navigator.userAgent) as unknown as Record<string, any>,
device,
prebidjsVersion: this.prebidInstance?.version || "unknown",
sessionDepth: sessionStorage?.optableSessionDepth || 1,
pageAuctionsCount: (window as any).optable?.pageAuctionsCount || 1,
sessionDepth: sessionStorage?.optableSessionDepthIndex || 1,
pageAuctionsCount: (window as any).optable?.pageAuctionIndex || 1,
};

// Log summary with bid counts
Expand Down
Loading