feat(analytics): implement subscription analytics with MRR, ARR, and cohort analysis - #1049
Open
ayomideadeniran wants to merge 1 commit into
Open
Conversation
…cohort analysis - Added granular MRR movement calculation (New, Expansion, Contraction, Churn, Reactivation, Net New) - Added Annual Recurring Revenue (ARR) normalization and run-rate projections - Added multi-period Cohort Retention Matrix analysis and lifecycle averages - Added customer unit economics engine (ARPU, LTV, CAC Payback period) - Added app/screens/AnalyticsScreen.tsx integration - Added comprehensive unit tests covering MRR breakdowns, cohort matrices, and unit economics Closes Smartdevs17#952
|
@ayomideadeniran Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements advanced subscription financial and cohort analytics, including detailed MRR movement breakdowns, ARR normalization, multi-period cohort retention matrices, and customer unit economics (ARPU, LTV, CAC payback).
Key Changes
1. Subscription Analytics Service (
src/services/analyticsService.ts)calculateDetailedMrrBreakdown): Tracks starting MRR, new MRR, expansion MRR, contraction MRR, churned MRR, reactivated MRR, Net New MRR, ending MRR, SaaS Quick Ratio, and Net Revenue Retention (NRR) %.calculateCohortRetentionMatrix): Groups subscriptions by monthly signup cohort and evaluates Month-0, Month-1, Month-2... retention percentages across the subscription lifecycle with benchmark averages.calculateCustomerUnitEconomics): Computes ARPU, Customer Lifetime Value (LTV), LTV:CAC ratios, and CAC payback timeline in months.2. Screen Integration (
app/screens/)app/screens/AnalyticsScreen.tsxscreen adapter.3. Tests & Verification
src/services/__tests__/analyticsService.test.tsverifying:Closes #952