Product Analytics Overview

How Zooly combines first-party journey events, PostHog, Session Replay, and the executive Stats dashboard

What this integration does

Zooly records the complete Z-Agent customer journey without making the product depend on an external analytics provider. Every product event is written to Zooly's journey_event table first and then delivered to PostHog on a best-effort basis.

The integration has two complementary views:

  • User Journey Stats is the simple, Production-only view for Jon and the internal team.
  • PostHog provides technical exploration, funnels, event breakdowns, and Session Replay.

What is measured

The executive funnel follows these milestones:

  1. Z-Link opened
  2. Signup started
  3. Signup completed
  4. Onboarding completed
  5. Agent created
  6. Link copied
  7. New contact
  8. Offer received

Supporting events describe onboarding steps, authentication outcomes, dashboard activity, conversations, errors, and operational delivery. See Journey Events for the complete taxonomy.

How to choose a view

NeedUse
Quick Production conversion checkUser Journey Stats
Filter an agency or accountUser Journey Stats
Inspect detailed event propertiesPostHog Activity
Watch what happened in a browser sessionPostHog Session Replay
Diagnose delivery, deduplication, or environment issuesZooly DB and PostHog Activity

Environment model

Development and Production use the same PostHog project and are separated by the normalized environment property:

  • development for dev.zooly.ai
  • production for app.zooly.ai

Stage does not have an independent analytics stream. The Stats dashboard intentionally reads only READ_ONLY_PROD_DB and only rows where environment = 'production'. Development activity can be inspected in PostHog, but it will not appear in Stats.

Components

  • @zooly/util: event envelope, sanitizer, session stitching, and browser logger
  • @zooly/util-srv: database-first persistence and PostHog delivery
  • @zooly/consent: PostHog browser initialization and Session Replay
  • zooly-app: first-party event ingest and Z-Agent instrumentation
  • zooly-auth: signup/login events routed back to the correct App environment
  • zooly-stats: admin-only Production dashboard and replay deep links
  1. Architecture
  2. Environment Setup
  3. Stats Dashboard
  4. Session Replay
  5. Testing and Troubleshooting