May 2026Product AnalyticsIn production1 min read

Product Analytics Pipeline

Tracking calls were scattered through Flutter screens, so staging events polluted production dashboards, re-renders fired duplicates and offline activity was dropped. I built one typed analytics layer over Amplitude that fixes all three. It carries ~15M events a month and has reprocessed 45M in one run.

Analytics the team can trust: test data kept out, duplicates dropped, offline activity delivered once the connection returns

Flutter / Dart / Amplitude / Hive

Surfaces
Flutter mobile and web
Offline path
Hive-persisted buffer before batch flush
Volume
~15M events/month typical
Largest run
45M events in one full reprocess (3-month window)

Milestone Timeline

  • Telemetry audit

    Mapped scattered tracking calls lacking shared schema validation, environment isolation, and retry behavior.

  • ProductAnalytics facade

    Introduced AnalyticsProvider contract and typed user/account identity models.

  • Buffering and dedup rollout

    Shipped Hive-backed event buffering and sliding-window deduplication middleware.

What it does

Behavioral tracking used to live as ad-hoc Amplitude calls inside feature UI. That produced three failure modes: sandbox events in production dashboards, duplicate .identify() / event spikes on re-renders, and one HTTP request per high-frequency action on flaky mobile networks.

I replaced them with a single ProductAnalytics facade: feature code calls domain methods; the facade owns schema validation, environment routing, deduplication, and batching.

The constraints, design decisions and outcomes are in the full case study.

What it demonstrates

  • Product-analytics infrastructure design (taxonomy, identity, environment isolation)
  • Offline-first client buffering and idempotent event emission
  • Separating vendor SDKs from feature code so destinations can change without rewriting screens