All specs
infrastructurelow complexity

Analytics & Tracking

Used in 4 specs

Understand how users interact with your product through event tracking, funnels, and retention analysis.

Options

Tracking Scope*

Track which pages users visit
Custom event tracking (clicks, form submissions, etc.)
Track drop-off through multi-step flows
Record and replay user sessions

Analytics Provider*

Privacy-first, no third-party data sharing
Rich insights and dashboards out of the box
Clickhouse or BigQuery for full control

Decision Points

Do you need to track individual user behavior (not just aggregate)?

If yes

Enable user events and choose a third-party provider with identity stitching.

If no

Page views with a self-hosted provider (Plausible) is sufficient and privacy-friendly.

Are you in a privacy-sensitive market (healthcare, finance, EU users)?

If yes

Use self-hosted analytics to avoid third-party data processors and simplify GDPR compliance.

If no

Third-party providers give better tooling with minimal compliance overhead.

Product analytics (behavior) vs business analytics (revenue/funnels)?

If yes

Product analytics: Amplitude/Mixpanel/PostHog for events, funnels, retention. Business: pair with a warehouse (BigQuery) + BI (Metabase).

If no

If you only need one, pick product analytics first — behavior insights drive most decisions.

Self-serve exploration (SQL/dashboards) or fixed reports?

If yes

Pipe events into BigQuery/ClickHouse and layer Metabase or Hex — lets non-engineers write ad-hoc queries.

If no

Canned dashboards in Amplitude/Mixpanel are faster to ship and cover the 80% case.

Do data scientists need raw warehouse access?

If yes

Use Segment/RudderStack or a reverse-ETL path to land raw events in BigQuery/Snowflake with full fidelity.

If no

Stay with a hosted analytics tool — raw-access is dead weight for product teams.

Is real-time dashboarding required or is 24h acceptable?

If yes

Choose a streaming stack (ClickHouse + Kafka, or PostHog) — most warehouse-based setups have 1–24h latency.

If no

Daily batch (warehouse + dbt) is cheaper and simpler for most reporting.

Do you need server-side tracking in addition to client-side?

If yes

Add server-side events for revenue, subscriptions, and auth — resistant to ad-blockers and more reliable than JS.

If no

Client-side only is fine for early-stage product analytics on consumer apps.

Will you use a CDP (Segment, RudderStack) for fan-out?

If yes

A CDP lets you send events to multiple destinations (analytics, CRM, warehouse) from a single pipe — worth it once you have 3+ destinations.

If no

Direct SDK integrations are cheaper and simpler with one or two destinations.

Do you need cohorts/funnels/retention (Amplitude, Mixpanel)?

If yes

Mixpanel/Amplitude/PostHog are purpose-built for this — skip the warehouse-BI detour.

If no

Plausible/Umami are sufficient for pageview and top-line numbers.

Are you subject to GDPR/CCPA opt-out requirements?

If yes

Ship a consent banner (Iubenda, OneTrust) and gate all trackers behind opt-in — self-hosted analytics (Plausible) skips the banner in most EU cases.

If no

Still honor Do Not Track, but a global banner is not required.

Must PII be redacted from event streams automatically?

If yes

Add a redaction middleware at the SDK or CDP layer — allowlist fields, block email/phone/tokens before they leave the client.

If no

Still advisable as defense-in-depth, but not a hard gate.

Do you need session replay (FullStory, LogRocket)?

If yes

PostHog bundles replay with analytics; FullStory/LogRocket are purpose-built — budget for storage and mandatory PII redaction.

If no

Heatmaps or funnels cover most UX debugging without the privacy surface.

Will events be used for usage-based billing?

If yes

Use a metering-specific store (Orb, Metronome) or a dedicated events table with idempotency keys — not your analytics tool.

If no

Analytics tools are not billing-grade — never bill from them directly.

Do you need attribution tracking (multi-touch, last-touch)?

If yes

Add UTM capture + a session/touchpoint model — Amplitude and Mixpanel both offer multi-touch attribution views.

If no

Skip it until marketing asks — attribution is hard to get right and easy to mislead with.

Should events be sampled at high volume?

If yes

Sample non-revenue events (scroll, hover) at 1–10% — keep revenue and conversion events at 100%.

If no

Full-fidelity is fine until event volume hits provider-pricing tiers.

Do you need to join analytics with production data regularly?

If yes

Warehouse-based stack (BigQuery + dbt) lets you join events with subscriptions, users, and revenue — hosted tools can not.

If no

Hosted analytics is enough; skip the warehouse overhead.

Do customers see their own analytics (customer-facing reporting)?

If yes

Use an embedded-analytics tool (Metabase embedded, Cube.dev, Explo) — do not expose your internal dashboards.

If no

Internal analytics stays internal — simpler security model.

Do you need A/B test instrumentation?

If yes

PostHog, Statsig, or LaunchDarkly Experiments wire flags + analytics together — do not roll your own significance testing.

If no

Skip until you have enough traffic for tests to reach significance.

Tradeoffs

ComplexityThird-party provider selected

User data is shared with vendor; may require GDPR consent flow

CostSession replay enabled

Significant storage cost; must redact sensitive fields (passwords, PII)

ComplexityCustom pipeline selected

Full data ownership and unlimited retention, but requires infrastructure expertise

Dependencies

user-system

Implementation Examples

PostHog

Open-source product analytics with session replay, feature flags, and A/B testing.

Mixpanel

Event-based analytics with powerful funnel, retention, and cohort analysis.

Plausible

Lightweight, privacy-friendly web analytics — no cookies, GDPR compliant by default.

Used by specs

Marketplace PlatformDeveloper Tool / API ProductSocial / Community AppAI-Powered SaaS