aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/analytics-geo.ts
Commit message (Collapse)AuthorAgeFilesLines
* analytics-geo: read rotated request log chunksAdam Soltys7 days1-6/+26
| | | | Co-Authored-By: Claude Opus 5.5 <[email protected]>
* analytics: monthly insight reports + signup instrumentationAdam Soltys2026-06-031-0/+114
scripts/analytics.ts — streams live db (SCAN, never KEYS) and reports for a trailing window (default 30d): MAU/WAU, new users, custody total + top holders, network volume by type (lightning/liquid/bitcoin/internal/bolt12/ fund), most-active and highest-volume users, and bolt12 recipients with a "regular" flag for the Ocean mining-reward stream. scripts/analytics-geo.ts — top countries from the request log. Counts only /login + /register events tied to a username (raw cf-ipcountry volume is dominated by datacenter/nostr traffic). Surfaces a distinct-IP-per-country column so proxy/VPN egress is visible, and filters a known credential-test bot IP. Honest result: US #1, then GB/CA/JP/DE/ES/BR. lib/register.ts — stamp `created` (ms epoch) and store `country` (CF/ ipregistry code) on new users, so future reports get real signup timing and geography from the db directly instead of log archaeology. Existing users predate this; backfill is out of scope. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>