The file_download event
A file_download event records that a visitor clicked a link to a downloadable file — a PDF, document, archive, or media file. Like outbound clicks, downloads escape ordinary page analytics because no new page loads. GA4 enhanced measurement fires file_download automatically for a defined list of file extensions, capturing the link and file type without code.
What this means
file_download fires when a visitor clicks a link whose target matches a downloadable file type. GA4 enhanced measurement recognises a built-in list of extensions (such as pdf, doc, docx, xlsx, zip, and common media types) and fires the event automatically with the link URL, file name, and extension.
Why it matters and its edges
Downloads are invisible to page analytics — the file opens or saves, no page_view occurs. The file_download event recovers that. Its edge is the extension list: a download served by a link that does not end in a recognised extension (for example a generated URL or a streaming endpoint) will not auto-fire and needs a custom event.
- Auto-fires for a built-in extension list
- Captures link URL, file name, extension
- Non-standard download URLs need a custom event
How it appears in analytics and logs
A file_download means a download link was clicked. Zero downloads on a resource page can mean the link is not a recognised file type, not that nobody downloads it.
Diagnostic use case
See which documents and assets visitors actually download, so you can measure the reach of PDFs and resources that page analytics never records.
What WebmasterID can help detect
WebmasterID can record downloads as first-party events keyed to the file, so asset reach is measurable without identifying visitors or relying on third-party scripts.
Common mistakes
- Assuming every download is auto-tracked regardless of URL.
- Forgetting custom events for generated or streamed downloads.
- Attaching visitor identity to download events.
Privacy and accuracy notes
A file_download records the file path or name and type, not the downloader. Keep the file identity; never attach who requested it. This is a content signal, not a person signal.
Related pages
- The click event and outbound clicks
A click event records that a visitor activated a link or element. The most common analytics use is the outbound click — a click on a link leaving your domain — which a normal page_view can never capture because the destination is another site. This page covers what to record on a click, how outbound detection works, and which properties stay privacy-safe.
- Enhanced measurement (auto events)
Enhanced measurement is a GA4 setting that automatically collects a set of interaction events — scrolls, outbound clicks, site search, video engagement, file downloads, and form interactions — without extra code. It is convenient but not magic: it only covers standard patterns, can over- or under-count, and each option can be toggled. This page explains what it does and its limits.
- Custom events: tracking what matters to you
Custom events capture meaningful actions a pageview cannot — a CTA click, a signup, a video play, a form submit. The value is in a consistent naming taxonomy and well-chosen properties. The risk is putting personal data into event names or properties, which turns analytics into surveillance. This page covers both.
- Event Explorer
See which files get downloaded.
Sources and verification notes
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.