Analytika: /auth sa uz nesleduje -- 1:1 duplicita landing eventu

Na /auth sa da dostat len plnym loadom stranky (vsetky interne
redirecty nan su REPLACE a beacon ich skipuje) a kazdy plny load uz
posiela event landing. Kazdy riadok /auth by tak mal dvojicku z toho
isteho loadu. Skip na frontende aj v _SKIPPED_PATHS (pokryje aj stare
cache-ovane verzie frontendu). Stare /auth riadky v DB ostavaju.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tim
2026-07-04 16:06:39 +02:00
co-authored by Claude Fable 5
parent 42f8dfdcf0
commit aed0cd5d7f
3 changed files with 13 additions and 5 deletions
+3 -2
View File
@@ -112,7 +112,8 @@ class StatsCase(unittest.TestCase):
def test_skipped_paths_not_recorded(self):
# "/", "/lobby" a "/game" (aj s dynamickym ID) sa vobec nezapisuju --
# vysoka frekvencia bez analytickej hodnoty (api/stats.py _SKIPPED_PATHS).
# vysoka frekvencia bez analytickej hodnoty; "/auth" zas preto, ze je
# to vzdy 1:1 duplicita eventu "landing" (api/stats.py _SKIPPED_PATHS).
async def _count():
from sqlalchemy import func, select as sa_select
@@ -125,7 +126,7 @@ class StatsCase(unittest.TestCase):
).scalar()
before = run(_count())
for path in ("/", "/lobby", "/lobby/abc-123", "/game", "/game/xyz-789"):
for path in ("/", "/auth", "/lobby", "/lobby/abc-123", "/game", "/game/xyz-789"):
run(stats.record_pageview(path=path, referrer="", user_agent=CHROME_UA))
after = run(_count())
self.assertEqual(after, before)