viakite
Dashboard

Guides/Use cases/SaaS products

SaaS products

Signup to paid: funnels, revenue, MRR and retention

You have a web app with a pricing page, sign-ups and paid plans. You want to know which channels bring people who pay, where sign-ups drop off, what your MRR is by source, and whether customers come back. Viakite does all of it in one place, tied together by your own user id.

Who it's for

Founders and product teams of a SaaS app: anything with an account, a trial or free plan, and a checkout.

What you get

FeatureWhat it answersGuide
Page views and sourcesWhich channels and campaigns bring visitorsSources
identifyWho each signed-in user is, across days and devicesIdentify users
Custom eventsSign-ups, checkouts, the actions that matterCustom events
GoalsHow many visitors signed up or paid, by sourceGoals
FunnelsWhere people drop off between pricing and paymentFunnels
Payment providersRevenue from Stripe or Dodo Payments, tied to the visit that led to itPayment providers
MRR and churnMRR, new MRR and churn rate by source and by planRevenue
RetentionWhat share of each week's sign-ups comes backRetention
AlertsAn email or Slack message when sign-ups stopAlerts
Ask AI"Why did sign-ups drop last week?" in plain wordsAsk AI

Set it up

  1. Install it at the root of the app

    Copy your public key from Analytics → Install, then add the component once. In Next.js:

    app/layout.tsx
    1import { Analytics } from "@viakite/sdk/react";
    2
    3export default function RootLayout({ children }: { children: React.ReactNode }) {
    4 return (
    5 <html lang="en">
    6 <body>
    7 {children}
    8 <Analytics project={process.env.NEXT_PUBLIC_VIAKITE_KEY!} />
    9 </body>
    10 </html>
    11 );
    12}

    Other frameworks are on Install Analytics. Page views, sources, engaged time and scroll depth now arrive on their own.

  2. Identify signed-in users

    Funnels across days, retention and payments all need your user id. Call identify whenever your app knows who is signed in, and reset on sign-out:

    src/useIdentify.ts
    1import { useEffect } from "react";
    2import { identify, reset } from "@viakite/sdk";
    3
    4export function useIdentify(user: { id: string; plan: string } | null) {
    5 useEffect(() => {
    6 if (user) identify(user.id, { plan: user.plan });
    7 else reset();
    8 }, [user]);
    9}

    The id lives in memory for the tab only, so call it on every page load of a signed-in session, not only at sign-in. Never use an e-mail address or phone number as the id.

  3. Send the steps that matter

    src/signup.ts
    1import { track } from "@viakite/sdk";
    2
    3// When the account is created
    4track("Signup", { method: "google" });
    5
    6// When someone opens checkout
    7track("Checkout started", { plan: "pro" });

    A sign-up finished on your server can be sent from there instead: see Backend and server events.

  4. Connect Stripe or Dodo Payments

    Open Settings → Payment providers, copy the webhook URL into Stripe or Dodo Payments with the events the card lists, and save the endpoint's signing secret. Then put your user id in each payment's metadata:

    checkout.ts
    1await stripe.checkout.sessions.create({
    2 // …your line items, mode and URLs
    3 mode: "subscription",
    4 metadata: { viakite_user_id: user.id },
    5 subscription_data: { metadata: { viakite_user_id: user.id } },
    6});

    Each payment becomes a Payment event with its revenue, counted for the source of the buyer's last visit, and subscriptions feed MRR and churn on the Revenue page. Full steps, Dodo Payments and Razorpay: Payment providers.

  5. Make goals and a funnel

    In Analytics → Goals, add two event goals: Signup and Payment. The Goals page then shows conversions, conversion rate and revenue for each, and each goal's page shows the channels and campaigns behind it.

    In Analytics → Funnels, click New funnel and add the steps: page /pricing, event Signup, event Checkout started, event Payment. Set Count to signed-in users to follow people for up to 30 days across devices.

  6. Watch retention and set an alert

    In Analytics → Retention, set First did to Signup and Came back and did to any page or event: each row is a week's sign-ups and the share who came back in the weeks after.

    In Analytics → Alerts, click New alert, pick the measure Conversions and type Signup as its goal, then drops below a number in a window (6 h or 24 h suits sign-ups), and choose who hears it (email, the bell, Slack, Teams or a webhook).

  7. Ask questions

    On Overview, Sources, Revenue and the other report pages, click Ask AI and ask "Which channel brought the most paying users this month?". Answers come from your own reports, with the numbers and the reports used.

What to watch

  • Payments need your user id. A payment without viakite_user_id, or from a user Viakite hasn't seen in the 30 days before it, is received but not counted as revenue. So identify must run on the pages buyers see before they pay.
  • Don't count revenue twice. Once a provider is connected, stop sending revenue with track for its payments.
  • Anonymous visitors last a day. Without cookies a visitor id changes every day, so funnels and retention by visitors stay within a day. Count signed-in users for anything longer.
  • MRR has limits. The Revenue page's filters don't apply to MRR, Razorpay subscriptions aren't read, and on Stripe tiered and metered prices count 0. See Revenue.
  • Your plan. Free keeps 30 days of data, allows 2 active alerts and gives 50 Ask AI credits a month; Pro keeps a year, with 10 alerts and 500 credits. See Plans and billing.