Glossary

Event tracking

Event tracking is the practice of recording the specific actions people take in your product — a page view, a button click, a signup, a purchase — as discrete events, each with a name and properties, so you can analyze behavior rather than just page traffic.

A live feed of tracked events arriving — page views, clicks, and signups, each with its own name and properties.

What an event is

An event is a record that something happened: a name (what), a person or anonymous visitor (who), a timestamp (when), and a set of properties (the details). purchase with amount, currency, and productId tells you far more than a raw page view ever could. Collect events consistently and every behavioral question — what do people do before they convert, who comes back, where do they drop off — becomes answerable.

Why events beat page views

Classic web analytics counts page views and sessions. That’s fine for traffic, but most products care about actions — and many of the actions that matter (clicking a feature, completing a step, hitting an error) aren’t page loads at all. Event tracking captures those actions directly, which is what makes funnels, retention cohorts, and per-person timelines possible. See product analytics vs web analytics for the fuller distinction.

Autocapture and manual tracking

There are two ways to collect events, and the best setups use both. Autocapture records common interactions automatically the moment the SDK is installed — no per-button code. Manual tracking means calling track('order_completed', { ... }) for the events unique to your product. Standardizing those names pays off downstream; see well-known events for why.

Identity ties events to people

On its own, an event belongs to an anonymous visitor. When you call identify(), the anonymous history merges into a single person, so every event before and after sign-in reads as one timeline — across devices. That’s identity resolution, and it’s what turns a stream of events into a unified customer profile.

A worked example

Compare what each model lets you ask. A page view of /checkout/success tells you a sale happened. A tracked event tells you what:

track('purchase', { amount: 49, currency: 'USD', plan: 'pro', coupon: 'LAUNCH' })

Now “revenue by plan this month”, “coupon redemption rate”, and “average order value by source” are each one query away — because the detail lives in the event’s properties, not buried in a URL.

How Pug does event tracking

Pug autocaptures page views, clicks, scrolls, and form submits (plus rage and dead clicks) after one init(), and you add named events with track() — well-known events get typed, validated properties. Every event is enriched with geo, device, and UTM on ingest, then flows into trends, funnels, retention, and user flows. Plan your events first with the free tracking-plan generator. See the SDKs to start.

FAQ

Event tracking — common questions

What is event tracking?

Event tracking is recording the discrete actions people take in your product — a page view, a click, a signup, a purchase — as named events with properties. Instead of only counting page traffic, you capture what users actually did, so you can analyze behavior.

What is the difference between event tracking and page tracking?

Page tracking counts page views — useful for traffic, blind to behavior. Event tracking records specific actions (added_to_cart, signup, video_played) with context, so you can build funnels, retention, and per-person timelines. A page view is just one kind of event.

What is an event property?

A property is a key–value detail attached to an event — a purchase might carry amount, currency, and productId. Properties are what you filter and break down by later, so consistent names and types matter as much as the event name itself.

Do I have to code every event by hand?

No. Autocapture records common interactions — page views, clicks, scrolls, form submits — automatically from one SDK snippet, and you add named custom events with track() for the moments that matter. Most teams use both.

See it in Pug.

Open-source product analytics with unified profiles. Self-host under AGPL-3.0, or use the free cloud during open beta.