Event tracking
Page views tell you what people read. Events tell you what they did. A subscribe button pressed, a PDF downloaded, a form submitted: you name the action in your HTML and Tinylytics counts it. Events appear on the Events tab and are kept out of your page-view numbers, so measuring a click never inflates your traffic.
Event tracking is in beta. It works, and it may still gain a rough edge or two.

Add ?events to your embed URL. Keep defer on the tag as usual.
<script defer src="https://tinylytics.app/embed/YOUR_EMBED_CODE.js?events"></script>
You can combine it with the widget parameters, as in ?events&kudos&hits. If hit collection is switched off for the site, or the script is loaded with ?ignore, events do not fire either โ the two travel together.
Automatic outbound links and downloads
Hand-tagging is the precise tool. If you mainly want to know whether people left for another site or took a file, add ?auto next to ?events:
<script defer src="https://tinylytics.app/embed/YOUR_EMBED_CODE.js?events&auto"></script>
You can also turn on Count outbound links and downloads under Settings โ Tracking. The embed still needs ?events.
Clicks are then recorded as ordinary Events:
- A link whose host is not the current page becomes
link.outbound, with the host as the value. - A link with a
downloadattribute, or a common file extension such as pdf, zip, or mp3, becomesfile.download, with the filename as the value. - Anything that already has
data-tinylytics-eventis left to that attribute, so a tagged control is not counted twice.
These are leave-page clicks, so they prefer sendBeacon (then fetch with keepalive) even if you have not added ?beacon. Promote link.outbound or file.download to a goal if you want a conversion rate on them.
Naming events
An event name is a category and an action joined by a dot: button.click, file.download, form.submit. The category is the part that pays off later, when the Events tab groups everything sensibly instead of handing you fifty unrelated words. A bare click is rejected for that reason. If arrows are easier to type, button->click is stored as button.click.
<button data-tinylytics-event="button.subscribe">Subscribe</button>
You can attach a value when the action has an obvious detail worth keeping, such as which file was downloaded:
<a href="/guides/guide.pdf"
data-tinylytics-event="file.download"
data-tinylytics-event-value="guide.pdf">
Download the guide
</a>
Put the attribute on the element that actually gets clicked. For a form, that means the submit button.
Clicks that leave the page
By default hand-tagged events are sent with fetch, which the browser is entitled to cancel if the click navigates away โ exactly the situation for a download or an outbound link. Adding ?beacon switches those to navigator.sendBeacon, which is designed to survive the page unloading. Automatic outbound and download events already prefer a beacon.
<script defer src="https://tinylytics.app/embed/YOUR_EMBED_CODE.js?events&beacon"></script>
The trade is that some privacy-focused browsers block beacons outright, so neither method is complete on its own. If these events matter to you, try both on your own audience and keep whichever loses less.
One more detail worth knowing: the script debounces each element to one event every 500ms, so an impatient double-click counts once.
Once you have an event you care about, you can promote it to a goal and get a conversion rate alongside it.