mirror of
https://github.com/hanzoai/ai.git
synced 2026-11-20 14:13:23 +00:00
The <script src="analytics.hanzo.ai/script.js" data-website-id> tag in public/index.html talked to a read LENS instead of the one ingestion front door, so the console could only ever produce pageviews — no errors, no product events. @hanzo/event POSTs api.hanzo.ai/v1/event, which Cloud fans server-side into the web (analytics), product (insights) and error (sentry) lenses; Cloud resolves the tenant, so there is no website id to keep in sync. Being in the bundle rather than the document also buys what a tag cannot: a pageview per client-side route change, window.onerror + unhandledrejection + a React ErrorBoundary on the same stream (no separate DSN), and identify() by the account's stable id — never email or any other PII. Global Privacy Control / Do-Not-Track disables the client outright. Co-authored-by: Hanzo Dev <[email protected]>