How autocapture works
Instead of writing a line of tracking code for every button and form, you add one analytics SDK. It listens to interactions in the browser or app and records them automatically, capturing context like the element clicked, its text, and its CSS selector. Events are usually batched and sent in the background, then often enriched server-side with details like geography, device, and UTM parameters.
Autocapture vs manual tracking
Manual (or “explicit”) tracking means calling a function like track('order_completed') for each event
you care about. It’s precise and well-named, but slow to set up and easy to forget. Autocapture solves the
cold-start problem — you get behavioral data the moment the SDK is installed, including interactions no tracking plan
would have predicted. The trade-off is that raw captured events are noisier than curated business events.
The best practice is to use both: autocapture for breadth and the long tail of interactions, plus a handful of named custom events for your key conversions.
Frustration signals
Richer autocapture also records rage clicks (rapid repeated clicks on the same spot) and dead clicks (clicks that produce no response) — early signals that a UI is confusing or broken, which you’d never think to instrument by hand.
Example: what autocapture records
Drop the SDK on an e-commerce site and a single visit can produce a stream like this — with no tracking code written:
page_view—/products/blue-runnerclick— button, text “Add to cart”, selector#pdp .add-to-cartrage_click— three rapid clicks on a greyed-out “Apply coupon” buttonform_submit— the checkout form (which fields were filled, never their values)
You never planned the rage_click — but it’s the exact signal that the coupon field is broken. That’s the
payoff: the interaction you’d never have thought to instrument is already captured.
How Pug does autocapture
After a single init(), Pug’s Web SDK autocaptures page views, clicks, scrolls, and form submissions,
plus rage and dead clicks, then enriches every event with geo, device, and browser, and UTM parameters on ingest.
Those events flow straight into trends, funnels, retention, and user flows, and you can
still add named custom events with track(). See the SDKs for setup.