How to set up product analytics events for a new SaaS
To set up product analytics for a new SaaS, pick a short list of events that follow a user from first visit to payment, name them in an [object] [verb] pattern, send the ones that carry money or identity from your server, and keep the rest in the browser. About eight events answer most early questions: where signups come from, how many reach the first useful action, and how many pay.
PostHog, Plausible, Stripe and GA4 behavior below comes from their documentation, read on 19 November 2026.
Start with questions, not tools
Write down what you want to learn before you add any code. For an early SaaS the questions are usually the same:
- Which channels bring people who sign up?
- What share of signups reach the first useful action, often called activation?
- What share of those start a trial or checkout, and how many pay?
- What do paying customers do in the first week that others do not?
Each question maps to an event. An event you cannot connect to a question adds noise and analysis time, and on usage-priced tools it adds cost. If you have not picked a tool yet, PostHog vs Plausible vs GA4 for an early-stage SaaS compares them.
The eight events
| Event | Where to send it | Question it answers |
|---|---|---|
page viewed | Browser (automatic) | Which pages and channels bring visitors |
user signed up | Server, after the account exists | How many visitors become accounts |
project created (your first useful action) | Server | How many accounts activate |
invite sent | Server | Whether the product spreads inside a team |
checkout started | Browser | Where buyers drop out before paying |
subscription started | Server, from the payment webhook | How many pay |
subscription canceled | Server, from the webhook | When and why people leave |
feedback submitted | Browser or server | What users ask for |
Replace project created with the action that matters in your product: a first invoice sent, a first monitor added, a first file shared. The test is whether a person who did it once is likely to keep using the product.
Name events the same way every time
PostHog's event capture docs recommend an [object] [verb] format, where the object is the entity and the verb is the behavior, with project created, user signed up and invite sent as examples. Pick one casing and one tense and write them in a short shared list. Renaming events later splits history in two, which makes a trend chart read as a drop.
Put variable details in properties and keep the event name stable. PostHog's examples add properties such as login_type and is_free_trial to a user signed up event, not a separate event per login method.
Add the code
In the browser with posthog-js, from the capture docs:
posthog.capture('user_signed_up', {
login_type: 'email',
is_free_trial: true
})
On the server with the Node client:
client.capture({
distinctId: 'distinct_id_of_the_user',
event: 'user signed up',
properties: {
login_type: 'email',
is_free_trial: true,
},
})
The docs also note that PostHog captures pageviews, pageleaves, clicks, input changes and form submissions automatically on common elements such as a, button, form and input. Autocapture gives you a free baseline, but custom events carry the meaning, so do not rely on click data alone to measure activation.
If you use Plausible, send custom events with the plausible() function, for example plausible('Signup'), or add a CSS class in the form plausible-event-name=Signup. Per Plausible's custom event docs, a custom event only shows conversion numbers after you create a matching goal under Goals in site settings, and custom events count toward your billable monthly pageviews. GA4 has recommended event names for common actions, including sign_up, begin_checkout and purchase, listed in Google's recommended events reference. Use those names there so its built-in reports pick them up.
Send money events from your server
Anything tied to payment should come from a trusted place. Browser events can be blocked by ad blockers and privacy settings, and a customer can pay and close the tab before your success page loads. Stripe's fulfillment guide says fulfillment cannot rely on the landing page because a customer may never reach it, and tells you to use the checkout.session.completed webhook event. It also says your handler must cope with being called more than once for the same Checkout Session.
Treat analytics the same way. Send subscription started from the webhook handler, include the Checkout Session ID as a property, and skip the event if you have already recorded that ID. Then the number matches the payments in your billing dashboard, and you can trust the conversion rate.
Identify users once
Send an anonymous browser ID until the person signs up, then link it to your user ID so the pre-signup visit and the later events belong to one person. PostHog's capture docs list identify() among the calls that mark a person as identified. Use your own database ID, never an email address in the distinct ID, so you can delete or export a person's data by ID later.
Check the data before you rely on it
- Open the live event view in your tool, go through signup yourself and confirm each event appears once.
- Compare yesterday's
subscription startedcount with the payments in your billing provider. - Filter your own team and test accounts out of reports with a property such as
is_internal. - Write the event list in your repo so the next person knows what each event means.
What to look at first
After two weeks of data, build one funnel: user signed up to your activation event to subscription started. Find the biggest drop and read the sessions or talk to the people who left at that step. That single funnel usually points at the next piece of work better than a dashboard of thirty charts. When traffic is low, treat percentages with caution, because a handful of users can swing a rate widely.
If errors rather than behavior are your problem, how to set up error monitoring for an indie SaaS is the companion setup.
Frequently asked questions
How many events should a new SaaS track?
Around eight. Cover the path from visit to signup, activation, checkout and cancellation, and add events only when you have a question they would answer.
How should I name analytics events?
PostHog recommends an [object] [verb] format, such as project created or invite sent. Pick one style, keep names stable, and put variable details in properties.
Should I track events in the browser or on the server?
Use the browser for page views and interface actions. Use your server for signup, payment and cancellation, since browser events can be blocked and a customer can pay without ever loading your success page.
Do I need Google Analytics if I use PostHog?
No. They overlap, and many early teams run only one. GA4 offers recommended events such as sign_up and purchase if you do add it.