Skip to content

feat(analytics): implement subscription analytics with MRR, ARR, and cohort analysis - #1049

Open
ayomideadeniran wants to merge 1 commit into
Smartdevs17:mainfrom
ayomideadeniran:feat/issue-952-analytics-mrr-cohort
Open

feat(analytics): implement subscription analytics with MRR, ARR, and cohort analysis#1049
ayomideadeniran wants to merge 1 commit into
Smartdevs17:mainfrom
ayomideadeniran:feat/issue-952-analytics-mrr-cohort

Conversation

@ayomideadeniran

Copy link
Copy Markdown

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)

  • Granular MRR Breakdown (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) %.
  • ARR Normalization: Calculates Annual Recurring Revenue and annualized run rates.
  • Multi-Period Cohort Matrix (calculateCohortRetentionMatrix): Groups subscriptions by monthly signup cohort and evaluates Month-0, Month-1, Month-2... retention percentages across the subscription lifecycle with benchmark averages.
  • Customer Unit Economics (calculateCustomerUnitEconomics): Computes ARPU, Customer Lifetime Value (LTV), LTV:CAC ratios, and CAC payback timeline in months.

2. Screen Integration (app/screens/)

  • Added app/screens/AnalyticsScreen.tsx screen adapter.

3. Tests & Verification

  • Added test coverage in src/services/__tests__/analyticsService.test.ts verifying:
    • Starting, new, expansion, churn, and net new MRR calculations
    • Multi-period cohort matrix generation and lifecycle retention averages
    • ARPU, LTV, and CAC payback period calculations

Closes #952

…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
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement subscription analytics with MRR, ARR, and cohort analysis

1 participant