File extension dimension
File extension is the dimension that records the suffix of a downloaded file — pdf, docx, zip and similar. GA4 enhanced measurement reads it as file_extension when a clicked link's URL ends in a recognised extension, firing a file_download event. It is the field for analysing downloads by format rather than by individual file, but it only carries values for extensions on GA4's default watched list.
What this means
When enhanced measurement detects a download, it records file_extension — the part of the URL after the final dot. The file extension dimension lets you group downloads by type, which is more useful than file_name when you want format trends rather than specific assets.
This answers questions like whether your audience prefers PDFs or editable documents.
Why some formats never appear
Detection is driven by a fixed default list of extensions (including pdf, doc, docx, xls, xlsx, ppt, pptx, zip and a few more). A download with an extension outside that list, or none at all, does not fire a file_download event, so its format is absent from the dimension entirely.
To measure other formats, send an explicit file_download or custom event that sets the extension yourself.
- Suffix of a downloaded file's URL
- Only recognised default extensions trigger detection
- Unlisted formats need manual events
How it appears in analytics and logs
A file extension value is the suffix of a downloaded file's URL. Missing formats mean the extension is not on GA4's default list, so its downloads never fired a file_download event.
Diagnostic use case
Use file extension to compare download demand by format — say PDFs versus spreadsheets — after confirming each format is on GA4's recognised extension list.
What WebmasterID can help detect
WebmasterID can log downloads with their format as first-party events, so format-level demand is measurable without third-party scripts.
Common mistakes
- Assuming all download formats appear regardless of GA4's list.
- Confusing file_extension with file_name's full path.
- Forgetting extension-less downloads never fire the event.
Privacy and accuracy notes
File extension records a format, not a person. WebmasterID records download formats as first-party events without identifying the downloader.
Related pages
- File name dimension: tracking downloads
File name is the dimension that records which document a visitor downloaded. GA4 enhanced measurement fires a file_download event when a link points to a recognised file extension, capturing file_name, file_extension, and link_text. It only watches a fixed list of common extensions (pdf, docx, xlsx, zip, and similar), so downloads with other extensions or behind redirects can go uncounted.
- Link URL dimension: where outbound clicks go
Link URL is the dimension that records the destination of a clicked link. In GA4 it is populated by the click event from enhanced measurement, which fires on outbound links and carries link_url, link_domain, and link_text. It answers 'where did people leave to?', but its automatic scope is limited to links leaving your domain — internal and same-domain clicks need separate handling.
- 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.
- Event Explorer
Inspect file_download events by format.
Sources and verification notes
- Google Analytics Help — [GA4] Enhanced measurement eventsDocuments the file_download event and file_extension parameter.
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.