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
| Feature | What it answers | Guide |
|---|---|---|
| Page views and sources | Which channels and campaigns bring visitors | Sources |
identify | Who each signed-in user is, across days and devices | Identify users |
| Custom events | Sign-ups, checkouts, the actions that matter | Custom events |
| Goals | How many visitors signed up or paid, by source | Goals |
| Funnels | Where people drop off between pricing and payment | Funnels |
| Payment providers | Revenue from Stripe or Dodo Payments, tied to the visit that led to it | Payment providers |
| MRR and churn | MRR, new MRR and churn rate by source and by plan | Revenue |
| Retention | What share of each week's sign-ups comes back | Retention |
| Alerts | An email or Slack message when sign-ups stop | Alerts |
| Ask AI | "Why did sign-ups drop last week?" in plain words | Ask AI |
Set it up
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.tsx1import { Analytics } from "@viakite/sdk/react";23export default function RootLayout({ children }: { children: React.ReactNode }) {4return (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.
Identify signed-in users
Funnels across days, retention and payments all need your user id. Call
identifywhenever your app knows who is signed in, andreseton sign-out:src/useIdentify.ts1import { useEffect } from "react";2import { identify, reset } from "@viakite/sdk";34export function useIdentify(user: { id: string; plan: string } | null) {5useEffect(() => {6if (user) identify(user.id, { plan: user.plan });7else 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.
Send the steps that matter
src/signup.ts1import { track } from "@viakite/sdk";23// When the account is created4track("Signup", { method: "google" });56// When someone opens checkout7track("Checkout started", { plan: "pro" });A sign-up finished on your server can be sent from there instead: see Backend and server events.
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.ts1await stripe.checkout.sessions.create({2// …your line items, mode and URLs3mode: "subscription",4metadata: { viakite_user_id: user.id },5subscription_data: { metadata: { viakite_user_id: user.id } },6});Each payment becomes a
Paymentevent 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.Make goals and a funnel
In Analytics → Goals, add two event goals:
SignupandPayment. 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, eventSignup, eventCheckout started, eventPayment. Set Count to signed-in users to follow people for up to 30 days across devices.Watch retention and set an alert
In Analytics → Retention, set First did to
Signupand 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
Signupas 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).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. Soidentifymust run on the pages buyers see before they pay. - Don't count revenue twice. Once a provider is connected, stop sending
revenuewithtrackfor 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.