Skip to content
Setup

Set up analytics for a new SaaS in 30 minutes

3 min read · Updated · By the Reveata team

The first customers of a new product teach you the most, and they are the easiest to lose track of. If analytics goes in after launch, you never learn where those first people came from. This guide is an ordered setup you can finish in one sitting. Each step is short; the order matters more than the speed.

1. Install the script and check it

  1. Add your website in Reveata and copy the snippet it shows. It already contains your tracking id.
  2. Paste it inside the <head> of every page: the marketing site, the sign-up page and the app. Single-page apps are handled automatically, so a React or Next.js app needs the tag only once. See Install the script and Frameworks and site builders.
  3. Open Realtime in Reveata and load your site in a normal browser window. Your visit should appear within a few seconds. If it doesn't, work through Verify your installation.

If your app lives on a subdomain such as app.example.com, it is counted with the main site already. If it lives on another root domain, add it with data-domains so the visitor is carried across. See Cross-domain tracking.

2. Keep yourself out

You will open your own site dozens of times a day while building. In Site settings → General → Exclusions, press Ignore this browser in each browser you use, and add your office or VPN address under Exclude IP addresses. See Exclusions.

3. Record the two or three actions that matter

Start small. For most SaaS products that means a sign-up and one action that shows someone got value. A button needs no JavaScript:

html
<button data-reveata-goal="signup">Create account</button>

Or from your code, after the account exists:

js
reveata('goal', 'signup');
reveata('goal', 'first_project');

See Custom goals for names, properties and form goals.

4. Identify people when they sign in

Call identify once the person has an account. Their earlier anonymous visits stay linked to them, and a payment made later from another device can still find them:

js
reveata('identify', { userId: 'user_123', email: '[email protected]' });

Only do this if your privacy policy allows it. See Identify visitors.

5. Connect payments

In Settings → Payments, connect Stripe, Polar or Dodo Payments, and pass window.reveata.metadata() into your checkout so each payment carries the visitor id. See Connect a payment provider, or Revenue attribution guide for the exact code per provider.

Once payments arrive, Reveata writes subscription goals such as billing:trial_started and billing:paid on their own. You don't add code for them.

6. Build one funnel

Open Goals and funnels, choose the Funnel tab and create a funnel such as Page visit /pricing → Goal signup → Goal billing:trial_started → Goal billing:paid. With little traffic it will look sparse at first. That's fine: the point is that it is counting from the first visitor. See Funnels.

7. Turn on two alerts

In Site settings → Alerts:

  • A payment is received, so you hear about every early sale and its source. With no alerts yet, Email me about every payment does it in one click.
  • Weekly summary, a Monday email comparing last week with the week before. See Weekly reports.

What you'll have afterwards

Every visit has a channel and source, every sign-up and payment is tied to the visit that led to it, and you hear about sales as they happen. When you start tagging links (see Tag your links so every visit has a source), campaigns fall into place without further setup.

What to do next

  • Tag the links you share in launch posts, newsletters and bios before you share them.
  • After your first ten or so customers, open Visitor journeys and read how a few of them found you.
  • Read See which channels bring paying customers once revenue starts to arrive.

Do it in Reveata

In the dashboard

  1. Add the website, paste the snippet and confirm your visit in Realtime.
  2. Site settings → General → Exclusions → Ignore this browser.
  3. Settings → Payments: connect your provider.
  4. Goals and funnels → Funnel → Create funnel.
  5. Site settings → Alerts: a payment alert and a Weekly summary.

With the API

Check that today's visits and goals are arriving:

bash
curl -G https://reveata.com/api/v1/websites/example.com/analytics/overview \
  -H "Authorization: Bearer $REVEATA_TOKEN" \
  --data-urlencode "period=today"

With an AI assistant

With the MCP server connected, ask:

Use get_realtime to show who is on the site now, then list_funnels and get_goals_report for today, and tell me whether signups and payments are being recorded.

Try it in your dashboardOpen your website in Reveata and follow the steps above with your own numbers.
Open dashboard →
Was this guide useful?

Next guides