Product analytics

Product analytics you can self-host

Funnels, retention, user flows, and a profile for each person, built from the events your product sends. Pug is open source: run it on your own servers, or on Pug Cloud, free up to 100k events a month.

Seven insight types One profile per person AGPL-3.0
Definition

What product analytics is

What people do inside your product, tied to each person over time.

Product analytics records what people do in your product as events and ties each one to the person who did it. That answers questions a page count can’t: which steps people complete, where they drop off, and whether they come back. Web analytics counts traffic instead, and most teams run both. How product analytics works walks through the event, the identity behind it, and the query each insight type runs.

The insights

Seven insight types

Each one filters and breaks down by any property, including the ones you send yourself, over events you have already collected.

Trends

Any event over time, as a count, unique users, or the sum, average, min, or max of a number. Break down by up to five properties.

Funnels

Conversion through ordered steps, with the drop-off and the average time between each.

Funnel analysis, defined

Retention

Of the people who did a start event, how many did a return event in each period after, by cohort.

Retention cohorts, defined

Segmentation

One number, such as signups or revenue, split by a property like country or plan. Made for KPI tiles.

User flow

A Sankey of the paths people take from one event to the next, and where they leave.

User flow analysis, defined

Top K

The most common values of any property, such as pages, referrers, or products, with the rest as “others”.

Map

One metric per country, such as events, unique users, or the sum of a number, for every country with traffic.

Getting data in

Three ways events get in

Autocapture starts with init(); the other two are calls you add where they matter.

Autocapture

On the web, init() starts capturing page views, clicks, scrolls, form submits, and rage and dead clicks.

Custom events

Call track() for actions specific to your product, like signup or order_completed, with any properties.

Identity

identify() at sign-in merges anonymous activity into the person’s profile. More in user analytics.

Own the tool

Run it on your own servers

Pug self-hosts as one Go binary and four stores: PostgreSQL, ClickHouse, NATS, and Dragonfly (or any Redis 7+). On a small node, pug start runs the server and every worker in one process.

What is product analytics?

Product analytics measures what people do inside your product (the events they fire, the funnels they move through, whether they come back), tied to a person over time. It answers questions that page counts can’t, such as where users drop off and which features bring them back.

How is product analytics different from web analytics?

Web analytics measures traffic: pageviews, sources, and devices. Product analytics measures behaviour (funnels, retention, user flows) attributed to individual users and cohorts. Most teams run both; see the full breakdown in product analytics vs web analytics.

Is Pug a free product analytics tool?

Yes. Self-host under AGPL-3.0 free forever with no event limits, or use the managed cloud, free up to 100,000 events a month. There’s no per-event bill when you run it yourself.

What is the best open source product analytics tool?

It depends on how much you want to operate. PostHog is a broad platform; Pug is a focused, self-hostable tool that runs as one Go binary and four stores. The comparison pages and tools roundup walk through the trade-offs.

Can I self-host product analytics?

Yes. Self-hosted under AGPL-3.0, Pug keeps every event on your own infrastructure. See self-hosted analytics for the stack.

Can an AI agent query my product analytics?

Yes. Pug’s MCP server lets Claude, ChatGPT, Cursor, or any other MCP client ask about trends, funnels, retention, user paths, top lists, and country maps, and create or edit a dashboard with upsert_dashboard, its one write tool. It queries the same API the dashboard does, so its numbers match yours.

Send your first event.

Create a project, add the snippet, and watch the Live view fill up. Or open the demo first: the real dashboard on a sample pet shop, with no sign-up.

Questions? Email hello@pug.sh