Downloads
The download event counts the files your visitors download from your site. It's a built-in event (see Custom events). It shows up as download in the "Triggered events" card of the Analytics tab (Events section), and in the CSV export. A dedicated "Downloads" card, in the Behavior section, ranks the most downloaded files on your site.
Trigger it from your site
Unlike outbound links, a download is not counted automatically — your site knows which links are files, the Snorklee code doesn't. So it's up to you to send the event on click:
document.querySelectorAll('a[href$=".pdf"], a[href$=".zip"]').forEach((a) => {
a.addEventListener('click', () => {
window.snorklee('download', {
url: new URL(a.href, location.href).pathname,
ext: 'pdf',
});
});
});
Recommended properties
The download event accepts any properties (10 max). The two most useful:
url— the file path (without the domain), to identify each file in the CSV export.ext— the extension (no dot), to filter by file type.
The "Triggered events" card shows the download count; the file-by-file breakdown (via url) is in the events CSV export.
Good habit
Stick to files that actually matter (documents, media, executables). No need to track every image or stylesheet — that's just noise, and the cap of 20 events per pageview applies.