Measuring Loop Velocity Without Portfolio Rows

Measuring Loop Velocity Without Portfolio Rows

●9 ●81 ●137
calendar_today • schedule1 min read
— Originally published at www.pocketportfolio.app

Measuring Loop Velocity Without Portfolio Rows

/admin/analytics is an operator console—revenue, referrals, npm packages, viral email blast stats, Pocket Analyst usage metadata. It is not a SQL console into user holdings.


API surface: GET /api/admin/analytics

app/api/admin/analytics/route.ts aggregates many subsystems in one response (time range via ?range=). Notable bundles:

  • Stripe — subscription / checkout signals keyed by price IDs (SPONSOR_PRICE_IDS, FOUNDERS_CLUB_PRICE_IDS).
  • Referrals — getReferralData(startDate) over referralEvents (clicks, conversions, by campaign, by source).
  • Viral moment — getViralMomentBlastMetrics + viralMomentEmailBlast object including viral_moment_v1 conversion rollups when campaign data exists.
  • NPM — download signals for scoped packages (NPM_PACKAGES array).
  • Pocket Analyst — events come from toolUsage writes (see Part 1) — flags like hadAttachment, not prompt text.

The UI is app/admin/analytics/page.tsx — tables and cards for humans, not raw Firestore dumps.


What “zero-PII analytics” actually means here

We minimize sensitive fields in product telemetry:

  • Referral events carry codes and campaign tags, not tickers.
  • Analyst logs carry uid/tier/booleans, not context strings.

We do not claim zero identifiers: UIDs exist wherever Firebase auth does.


GA4 vs admin

GA4 answers marketing acquisition (active users, sources). Admin API answers product operations (paid tiers, referral funnel, blast performance). Use both; never conflate without labels (Part 4).


Part 9 of Sovereign Engineering.

Read the full Sovereign Intelligence book or try the app.

Want more #software-engineering & #software-engineering deep dives?

Join 5,955+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

2 Comments

1 vote
1

More Posts

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolio - Apr 1

Local-First: The Browser as the Vault

Pocket Portfolio - Apr 20

Architecting a Local-First Hybrid RAG for Finance

Pocket Portfolio - Feb 25

Engineering the Viral Loop

Pocket Portfolio - Apr 27

The Privacy Gap: Why sending financial ledgers to OpenAI is broken

Pocket Portfolio - Feb 23
chevron_left
5.8k Points • 227 Badges
United Kingdom • pocketportfolio.app/press
67Posts
50Comments
35Connections
Led delivery of OceanBrain at National Grid Ventures, reducing manual subsea investigations by 60%.
... Show more

Related Jobs

Commenters (This Week)

1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!