Skip to content

(For Analytics Prototype instead of v2) Change key names for sessionDepth and pageAuctionsCount in Analytics …#290

Merged
jplaroche merged 1 commit into
masterfrom
fix-double-counting-prototype
May 21, 2026
Merged

(For Analytics Prototype instead of v2) Change key names for sessionDepth and pageAuctionsCount in Analytics …#290
jplaroche merged 1 commit into
masterfrom
fix-double-counting-prototype

Conversation

@jplaroche
Copy link
Copy Markdown
Contributor

@jplaroche jplaroche commented May 21, 2026

…prototype

In a nutshell, both the prototype and prod version of analytics are incrementing these values:

  • pageAuctionsCount
  • sessionDepth

Which means that the values are reported in double.

Example:

  • User goes to the page
    • sessionStorage.optableSessionDepth is incremented by prototype analytics
    • sessionStorage.optableSessionDepth is incremented by prod analytics
    • sessionDepth is now at 2, but the user only visited one page in this session
  • Then auction start, both analytics record sessionDepth as 2 instead of one.
    Same thing happens for pageAuctionsCount, which will return 1 for the first analytics loaded and then 2 for the second analytics loaded. One of them is not correct, but we cannot find which one is wrong.

This PR changes the sessionStorage key and javascript variable names to avoid this conflict.

I decided to edit the prototype one so that we can keep the prod/V2 one with the same key/variable name as the names in the analytics, avoid confusion in the future.

@jplaroche jplaroche merged commit c77dce2 into master May 21, 2026
7 checks passed
@jplaroche jplaroche deleted the fix-double-counting-prototype branch May 21, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants