Skip to content

B2B SaaS Analytics

B2B SaaS

Track B2B SaaS activation, retention, and account LTV

Wire identify() with a nested account object, one real product custom event, and Stripe webhooks in Apex to light up activation funnels, cohort retention, NRR, and account LTV.

Works with Stripe live and sk_test_ sandboxes. Account rollups activate automatically.

6 min read15 min setupUpdated
Head of customer success and two enterprise teammates reviewing a printed account binder around a sunlit pale oak lounge table.
Connect user sign-ups, real product activation events, and Stripe subscription dollars under one account record.

Interactive B2B SaaS account NRR & LTV model

Model activation funnel, Net Revenue Retention, and account-level LTV

Every slider recalculates activated accounts, Stripe-powered NRR, and illustrative projected 12-month account LTV in real time.

Illustrative B2B SaaS workspace · Stripe charge data
ApexRetention & Accounts · NRR + Account LTV
250

Accounts created via verified identify() calls with account.id.

$180

Starting monthly recurring revenue billed in Stripe.

16%

Net Revenue Retention = (Initial + Expansion - Contraction - Churned) / Initial.

11%

Combined downgrade contraction and subscription cancellations in Stripe.

Activated accounts / mo

95

95 activated from 250 sign-ups (38%)

Net Revenue Retention

105%

100% + 16% expansion - 11% churn/contraction

Projected 12-month LTV (illustrative)

$2,268

Starting MRR $17,100

Sample Account Rollup (via identify account.id + groups[])

Northwind Ops$5,443 projected 12m LTV

acct_northwind · Enterprise · seat_count: 28 · $432/mo

Sub-accounts: ws_prod, ws_eu (parent_id: acct_northwind)

Kestrel Logistics$2,495 projected 12m LTV

acct_kestrel · Growth · seat_count: 12 · $198/mo

Sub-accounts: team_ops (parent_id: acct_kestrel)

Harbor Labs$1,588 projected 12m LTV

acct_harbor · Pro · seat_count: 6 · $126/mo

Sub-accounts: ws_main (parent_id: acct_harbor)

Pass account.id and optional seat_count on verified identify() calls, plus groups[] with parent_id for workspaces or teams. Revenue lands on the billed account; a parent account's LTV is its own counters, not the sum of its child groups.
How parent accounts and sub-accounts roll up

The complete playbook

Step-by-step setup, worked math, and real limits.

Steps, technical details, and live pricing.

How it works without Apex

Install the Apex snippet or SDK, call identify() on sign-up with userId, email, and a nested account object (account.id plus optional name, domain, plan, seat_count, and groups[] with parent_id for sub-accounts), fire at least one product custom event so active users separate from page views, and connect Stripe webhooks. Apex lights up Activation funnels, contact retention, Stripe charge-powered NRR, and account LTV.

How Apex does it for you

Apex matches Stripe invoice.paid and subscription cancellations by externalIds.stripe_customer_id (when previously matched, then email fallback) idempotently, groups teammates under account.id, links sub-accounts via groups[] with parent_id (parent LTV stays its own counters), and computes contact and Stripe charge-based NRR cohorts.

How to set this up in 5 steps

  1. Call identify() with a nested account object on sign-up and login

    Pass userId, email, and an account object containing at least account.id (plus optional name, domain, plan, or seat_count), and use groups[] with parent_id for workspaces, teams, or sub-accounts. Apex creates the Account automatically and links teammates under it.

  2. Send at least one real product custom event

    Automatic page_view events intentionally do not mark a user Active in the Activation funnel. Fire a real custom event (such as project_created or report_exported) when someone actually uses your product.

  3. Connect Stripe webhooks (live or sk_test_ test mode)

    Connect Stripe in Integrations so invoice.paid promotes contacts to customer and adds paid dollars to conversionValue, while customer.subscription.deleted marks churn cleanly.

  4. Understand how Stripe matches contacts and parent accounts

    Apex matches Stripe webhooks by externalIds.stripe_customer_id if previously matched, then falls back to email (saving the Stripe customer ID for faster future lookups). Revenue lands on the billed account; a parent account's LTV is its own counters, not the sum of its children.

  5. Read Activation, Cohort Retention, NRR, and Account LTV together

    Inspect the Sign-ups -> Active -> Activated funnel, switch between contact-based and revenue-based retention (NRR), and drill into any company under Accounts to see member roster and rolled-up LTV.

How the Activation funnel works

Most analytics dashboards make sign-ups look healthier than they are by counting anyone who loaded /dashboard once as an active user. Apex separates passive visits from real product usage across three strict stages:

  1. Sign-ups: Every contact with a createdAt timestamp from identify().
  2. Active: Only contacts who fired at least one custom event (or have activatedAt set). Automatic page_view events intentionally do not count.
  3. Activated: Contacts whose lifecycleStage reaches activated, customer, or expanded via your product milestone or Stripe payment.
Account executive in a white oxford shirt speaking warmly with two smiling colleagues around a sunny wooden conference table.
Pass a nested account object with account.id on identify() to light up multi-seat Account LTV rollups and member rosters automatically.

Contact retention vs NRR

Once Stripe webhooks are connected, Apex renders two side-by-side retention lenses over monthly signup cohorts:

  • Contact-based retention: Share of signed-up users still active (lifecycleStage not churned or dormant) across M0, M1, M2, and beyond.
  • Revenue-based retention (NRR): (initial MRR + expansion - contraction - churned) / initial MRR, powered entirely by Stripe charge data.

Keep in mind that these MRR and NRR figures are built for growth and retention decisions rather than investor-grade GAAP accounting.

Enterprise IT director and SaaS onboarding specialist shaking hands warmly inside a bright glass office atrium.
Automatic page_view events stay out of Active counts so your Activation funnel and Stripe NRR cohorts reflect genuine product adoption.

Account rollups & Stripe matching

Pass a nested account object inside a verified identify() call on sign-up and login with at least account.id (plus optional name, domain, plan, or seat_count), and use groups[] with parent_id for workspaces, teams, or sub-accounts. Apex creates the Account record automatically, rolls member revenue into that billed account's LTV (note: a parent account's LTV is its own counters, not the sum of its child groups), and matches Stripe webhooks by externalIds.stripe_customer_id if previously matched, then falls back to email (storing the Stripe customer ID on the first match). Stripe sk_test_ test keys are supported so you can verify everything end to end before switching to production.

What this costs on Apex

Live Apex pricing · Pay-as-you-go

Estimated Apex cost for B2B SaaS app tracking 30,000 monthly product events and Stripe billing webhooks

$0 / month

Covered by monthly free allowances.

Apex meter / scheduleScenario volumeFree allowance / basisRateApex cost
Events
identify() calls and custom product activation events (30,000 monthly web events)
30,000 / mo1M / month$5 per 100K events$0

Account LTV rollups, Activation funnels, cohort retention, and Stripe billing sync are included with zero seat fees. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.

Third-party and campaign costs (not paid to Apex)

ExpenseTypical rangeNotes
Stripe Billing webhook sync$0/moReal-time invoice.paid and subscription cancellation sync included

Launch with your AI agent

Audit B2B SaaS accounts, recurring revenue, and expansion via MCP

After wiring identify() with account.id and Stripe, ask your coding agent to inspect account rollups, MRR, and net expansion directly from Apex.

1Add Apex to your editor

Install in Grok Build

Opens Grok Build and adds Apex. Nothing to configure.

2Tell your agent

Prompt for your AI editor

In my Apex workspace, call list_accounts, get_saas_recurring_revenue, and get_saas_expansion to verify our B2B accounts are rolling up member activity and Stripe subscription revenue accurately.

The first time your agent calls Apex, it gives you a link to approve in the browser. There is no key to paste. In Grok Build you can also run /setup-apex.

See how editor setup works step by step

saas-app · Grok BuildWaiting for approval
Agent
You

Set up Apex in this repo.

Set up Apex · 0 of 4
  • Signed in
  • Workspace named
  • Events arriving
  • Conversion picked
  • Stripe

Your move

Know which accounts actually activate, expand, and stick.

Pass account.id on identify(), track one real product event, and connect Stripe to turn sign-up noise into B2B retention and LTV.