Aller au contenu
snorklee
Fonctionnalités Trafic IA Tarifs Manifeste Aide Audit Contact Connexion Démarrer gratuitement

Downloads

The download event measures files downloaded 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 (Conversions & revenue section), and in the CSV export.

Trigger it from your site

Unlike outbound links, a download is not captured automatically — your site knows which links are files, the tracker doesn't. You fire 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',
    });
  });
});

The download event accepts any properties (10 max). The 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 type.

The "Triggered events" card shows the download count; the per-file breakdown (via url) is available in the events CSV export.

Best practice

Stick to files that actually matter (documents, media, executables). No need to instrument every image or stylesheet — that's noise, and the cap of 20 events per pageview applies.