What product analytics measures
Product analytics answers behavioural questions: which steps convert, where people drop off, whether they come back a week later, and what they do next. It works on events, each tied to a person over time. That is the difference from web analytics, which counts page views, sources and devices at the page level. Most teams run both, for different questions.
Events: what gets recorded
An event is one action at one moment. It has a name
(page_view, signup, order_completed), a timestamp, the ID of whoever did it,
and properties that describe it: the plan, the price, the screen, the referrer. Every report later in this guide is
a query over those rows, so the quality of the names and properties decides what you can ask.
Events arrive two ways. Autocapture records common interactions with no code per
event: Pug’s Web SDK starts capturing page views, clicks, scrolls, form submits, and rage and dead clicks after one
init(). That is web only; the mobile SDKs track app lifecycle, installs and screen views instead, and Flutter needs a
route observer for the screen views. The
second way is an explicit track() call for the actions specific to your product, like
signup or subscription_started. Standard names for those actions keep a schema readable a
year later; well-known events explains why.
Identity: from anonymous to known
An event is only useful for funnels and retention if you know whose it is. Before sign-in, events carry an
anonymous ID. When your code calls identify(userId) at sign-in, that anonymous history merges into one
profile, and events from a second device join the same profile once
that device identifies with the same ID. Traits such as plan or company then live on the profile and filter every
report. Identity resolution covers the merge rules in detail.
One limit to know: in Pug’s Web SDK the default consent state is cookieless, which stores no identifier on the device, and
identify() does nothing until consent is granted. A cookieless visitor still counts in event totals and
sessions, but not as a person. Cookieless funnels and retention
shows which metrics that changes.
Where the events are stored
Event stores are usually columnar databases built for analytical queries, such as ClickHouse. A funnel or retention query reads a few columns (event name, person, timestamp) across millions of rows, and a column store reads only those columns from disk. Pug writes events to ClickHouse through a queue and Go workers; the platform overview shows the pipeline from SDK batch to stored row.
The insight types
Every product-analytics tool builds its reports from a small set of query shapes:
- Trends: any event over time, as a count, unique people, or the sum or average of a number, broken down by properties. A trend of unique people is active users.
- Funnels: conversion through ordered steps, with the drop-off and the time between each step.
- Retention: cohorts grouped by when people started, and the share that came back in each later period.
- Segmentation: one number, such as signups or revenue, split by a property like country or plan.
- User flows: a Sankey of the paths people take from one event to the next, and where they leave.
- Top lists: the most common values of a property, such as pages, referrers or products.
Pug has all six plus a map, one metric per country. The analytics overview shows each one as the dashboard draws it.
Running it yourself
Behavioural data is a detailed record of what your users do, which is why some teams want the whole tool on their own servers. An open-source tool you can self-host keeps the events in a database you run and lets you read how they are processed. Pug is one: open source product analytics under AGPL-3.0, self-hosted as one Go binary with PostgreSQL, ClickHouse, NATS and Dragonfly. The self-hosted analytics page lists what that takes to run.
Choosing a tool
Weigh three things. Scope: whether you need analytics alone, or also session replay and feature flags, which only the broader platforms ship. Operating cost: some tools self-host as one binary and a few databases, others as a multi-service stack. Data ownership: whether you can self-host it and read your raw events back out. The product analytics tools roundup compares prices and SSO plans, and the open source analytics tools roundup compares licenses and what each free edition leaves out.