You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve inflated visitor counts caused by three issues:
- Visit cookie used a fixed TTL instead of a sliding window, creating
new visits for users browsing longer than 30 minutes. Now refreshes
the cookie TTL on every request.
- Prefetch and RSC requests triggered new visit and product view events.
Now guards against Next-Router-Prefetch and RSC headers so only real
navigations fire analytics mutations.
- Locale redirects from withIntl bypassed analytics entirely. Reorder
middleware so withAnalyticsCookies runs before withIntl, ensuring
cookies survive redirect responses.
Fixes CATALYST-1532
Co-authored-by: Claude <noreply@anthropic.com>
Fix analytics visit count inflation by implementing a sliding window for the visit cookie TTL, guarding against prefetch/RSC requests creating spurious visits, and reordering middleware so analytics cookies survive locale redirects.
0 commit comments