Events and goals
Updated October 17, 2026
Events without code
Add data-statsdot-event to a button, a link or a form:
<button data-statsdot-event="Signup">Create account</button>
<a href="/brochure.pdf" data-statsdot-event="Brochure" data-statsdot-label="2026">Download</a>
<form data-statsdot-event="Contact">...</form>
Buttons and links count on click; forms count on submit, so submissions the browser rejects as invalid do not count.
Events from code
window.statsdot.track('Purchase');
window.statsdot.track('Plan selected', 'Growth');
The second argument is an optional label. In the dashboard, filtering by an event shows its labels.
Automatic events
Without any code, Statsdot counts clicks on links to other sites (Outbound Link, labelled with the address) and on files such as PDF, ZIP or DOCX (File Download). Turn them off with data-auto="false" on the script.
Goals
In the site settings, add a goal:
- Page visit: an exact path such as
/thanks. Paths are matched without query string. - Event: an event name such as
Signup.
The dashboard then shows how many visitors reached each goal and the conversion rate over all visitors. For pages whose address includes an id (an order number, for example), send an event instead.