What is an event in analytics?

An event is any recorded action beyond loading a page: a button click, a form submitted, a video played, a subscription upgraded. Events carry a name and optional properties describing the specifics, and they are what turns analytics from a traffic report into a record of what people actually did.

Autocapture and explicit events

There are two ways events get recorded, and mature setups use both for different jobs.

Autocapture records interactions automatically without any code: clicks on links, form submissions, outbound navigation. It is immediate, it needs no engineering time, and it is retroactive in tools that store the raw interactions. Its weakness is that the events are described by DOM selectors, so a redesign that changes a class name silently breaks the measurement.

Explicit events are sent by your code with a name you chose. They survive redesigns, they can carry meaningful properties, and they can be fired from the backend where the browser cannot be trusted. They cost engineering time and they only exist from the day someone adds them.

The sensible split: autocapture for exploration and for the long tail of interactions, explicit events for anything you report on, and server-side explicit events for anything involving money.

Properties are where the value is

An event name should describe what happened. Everything variable about it belongs in properties.

The failure mode is encoding variables in the name: report-created-pdf, report-created-csv, report-created-pdf-scheduled. Three events that cannot be totalled, and a fourth appears the moment someone ships a new format. One event named report created, with format and scheduled properties, answers every version of the question and keeps totalling correctly.

Keep properties low cardinality where you can. A property holding a user id or a timestamp creates as many distinct values as there are events, which makes grouping useless and storage expensive. Never put personal data in a property.

See it on real data. The live demo is a fully populated dashboard on demo traffic, with no signup and no card.

Open the live demo

A naming convention worth enforcing

  • Object then action, past tense

    report created, invite sent, subscription upgraded. Consistent word order means an alphabetical list groups itself by object.

  • One case style, forever

    Event names are usually case sensitive. Signup and signup are two events. Pick lowercase and never deviate.

  • Write the plan down first

    A tracking plan listing every event, its properties and its owner is the difference between a catalogue people trust and three hundred events nobody can define.

  • Fewer than twenty to start

    Signup, activation, the core value action, the paid conversion. Add more when a specific question demands it, not in anticipation.

Events, goals and revenue

A goal is just an event you decided matters. Marking an event as a goal is what lets it appear as a conversion rate, as a funnel step, and as an outcome attributed to the campaign that produced it.

Attaching a value turns it into revenue. A purchase event carrying an amount lets the same event stream answer both what converted and what it was worth, which is why marketing and finance numbers stop disagreeing when revenue lives on the event rather than in a separate system.

mrkr supports events from the browser tracker and from your backend over the HTTP API, with optional properties and an optional revenue value. Events work in the default cookieless mode, since an event belongs to a session rather than to a person tracked across days. Attributing an event to a person over weeks needs your own user id or the optional per-site cookie mode, which requires consent on that site.

What is the difference between an event and a goal?

A goal is an event you have designated as important. The underlying record is identical; the designation is what makes it appear as a conversion rate, as a funnel endpoint, and as an outcome credited to a traffic source.

Should I use autocapture or custom events?

Both. Autocapture covers the long tail of clicks with no engineering time and is good for exploration, but it breaks when the DOM changes. Use explicit custom events for anything you report on, and send financially important events from your backend where nothing can block them.

How should I name analytics events?

Object then action, past tense, one consistent case: report created, invite sent, subscription upgraded. Put everything variable in properties rather than in the name, so events stay countable, and write the whole list down in a tracking plan.

Start with one line of HTML.Your first visitors show up within a minute.