stack/packages/template/src
BilalG1 310278781a
Fix EventTracker silently dormant in real browsers (#1327)
`window.screen` and `window.history` are accessor properties on
`Window.prototype`, so `Object.getOwnPropertyDescriptor(window,
X)?.value` returned undefined in real browsers, causing `start()` to
short-circuit and never capture or send any $page-view / $click events.
Read the globals directly instead; the jsdom-based regression test pins
the accessor-descriptor shape so this can't silently come back.

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Added a new test suite verifying event batching, timing, page-view and
click event capture, and client-side navigation behavior using simulated
timers and DOM environment.

* **Bug Fixes**
* Improved event tracker reliability by changing how browser screen and
history are read, yielding more consistent detection of screen
dimensions and navigation for analytics capture.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-13 09:24:40 -07:00
..
components Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
components-page Update sign-in page to redirect to onboarding when needed 2026-04-09 12:19:08 -07:00
generated Fix dev-perf-stats 2026-02-04 13:59:31 -08:00
integrations change cli init across docs (#1245) 2026-03-13 10:45:24 -07:00
lib Fix EventTracker silently dormant in real browsers (#1327) 2026-04-13 09:24:40 -07:00
providers Remove UserFetcher from StackProvider — make dashboard static 2025-10-19 13:44:42 -07:00
utils Add basic client lib tests (#601) 2025-04-03 20:05:44 +02:00
global.css Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
global.d.ts Vanilla JS client library (#408) 2025-02-08 02:31:03 +01:00
index.ts make config typesafe (#1254) 2026-04-06 18:31:55 +00:00