Dev shares 6-step privacy-safe analytics setup for a WhatsApp agent using SHA256-hashed IDs
petrusenko_max · x · 2026-11-03
Indie developer Max Petrusenko detailed how he wires analytics into his WhatsApp agent that handles replies and follow-ups for his contact improv class, without ever exposing raw phone numbers:
- Fire one PostHog event per live send (cimessagesent)
- Attach context like lane, variant, questionid, lang, channel for later attribution
- Use distinctid = "wa" + first 16 chars of sha256(phone), keeping one person as one identity across lanes
- Fail open: if the event call breaks, the message still goes out
- Dry runs only log, so test sends never pollute the numbers
A concrete, reproducible recipe for anyone connecting analytics to agents that message real people.
More from coding & agent
- Agent-designed nested Kubernetes horror: kcp partitions on bare metal under KubeVirt under guest clusters — sloppenheimer · 2026-11-03
- Real-world agent test: flight and hotel rebooking burned tokens, manual app was still easier — curious_vii · 2026-11-03
- Dev ditches adversarial AI code review: 'a waste of tokens', prefers verification — sloppenheimer · 2026-11-03
- YC's Momentic launches QA-Bench: its AI QA agent finds 2.7x more reproducible bugs than Codex — ycombinator · 2026-11-03
- Ex-professional translator open-sources Subtitle Foundry, a modular AI subtitle workbench — mrtdlgc · 2026-11-03
- 8-layer architecture for building agent skill libraries: Skill = Trigger + Procedure + Resources + Checks — 2C_ornot2C · 2026-11-03