Skip to content

Commit c06b3c0

Browse files
paynejdclaude
andcommitted
OpenConceptLab/ocl_online#70 | Track signup and logout in analytics
Remove /users/signup/ and /users/logout/ from AnalyticsMiddleware's ignore list. They're real user-intent events — top-of-funnel and session-end signals — and belong in APITransaction like the login events previously added in ocl_online#55. The remaining ignore_paths stay skipped — favicon, swagger, redoc, version, toggles, OIDC code exchange, api-token, password reset, and /user (singular). Those are noise/auth flows that don't represent meaningful usage. Verified no password leak: core/services/analytics_event_emitter.py captures request method, path (URL + query string), headers (with auth/cookie redacted), and client — never the request body. Signup payloads carry the password in POST body, which is not emitted. Part of the data-extraction-v2 coverage audit. See ocl-strategy/docs/plans/data-extraction-v2-plan.md item 6 section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a69141f commit c06b3c0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

core/middlewares/middlewares.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,13 @@ def __call__(self, request):
275275
response = self.get_response(request)
276276
path = request.path
277277

278-
ignore_any_under_paths = ['/users/logout/', '/users/signup/']
278+
# /users/signup/ and /users/logout/ are tracked — they're real
279+
# user-intent events (top-of-funnel + session-end signal). Login
280+
# tracking was added previously via ocl_online#55.
281+
ignore_any_under_paths = []
279282
ignore_paths = [
280283
'', '/swagger', '/redoc', '/version', '/toggles', '/users/oidc/code-exchange', '/favicon.ico',
281284
'/users/api-token', '/users/password/reset', '/user',
282-
*[p.rstrip('/') for p in ignore_any_under_paths]
283285
]
284286
if path.rstrip("/") not in ignore_paths and not any(path.startswith(p) for p in ignore_any_under_paths):
285287
duration_ms = int((time.monotonic() - start) * 1000)

0 commit comments

Comments
 (0)