mirror of
https://github.com/hanzoai/social.git
synced 2026-08-05 00:23:10 +00:00
Completes the previous commit, which removed PostHog and Plausible from the
layout but left useFireEvents still calling usePostHog()/usePlausible() — hooks
whose providers no longer existed. That helper is live in five components
(register, lifetime-deal, main-billing, launches, new-subscription), so this is
the other half of that change, not a cleanup afterthought.
useFireEvents now posts the ONE door (api.hanzo.ai/v1/event) through
@hanzo/event, and identifies by the stable user id ALONE. It previously sent
posthog.identify(user.id, { email, name }) on every single fire — the id is what
joins events server-side, so the PII bought nothing and cost a lot.
Also deletes libraries/react-shared-libraries/src/helpers/posthog.tsx, which had
zero importers once PHProvider was gone, and drops posthog-js + next-plausible.
@dub/analytics stays: useDubClickId is affiliate attribution for checkout, a
commerce concern rather than a telemetry tag, and retiring upstream's social.pro
referral program is a separate decision.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>