Measuring Loop Velocity Without Portfolio Rows

Measuring Loop Velocity Without Portfolio Rows

5 50 114
calendar_todayschedule1 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).
  • ReferralsgetReferralData(startDate) over referralEvents (clicks, conversions, by campaign, by source).
  • Viral momentgetViralMomentBlastMetrics + 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.

2 Comments

1 vote
1
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

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 Points169 Badges
United Kingdompocketportfolio.app/press
66Posts
50Comments
32Connections
Led delivery of OceanBrain at National Grid Ventures, reducing manual subsea investigations by 60%.
... Show more

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!