The file download event in GA4 enhanced measurement automatically sends a file_download event when a specific file extension (.pdf, .zip, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .csv, .txt, .rtf, .exe, etc.) is detected in the <a href> tag. At this time, the file_name, file_extension, and link_url parameters are collected together.
Tracking file downloads in UA required a separate setup in GTM, adding a regular expression condition to the link click trigger. GA4 Enhanced Measurement fully automates this process.
Note: The event is triggered when the file link is clicked, not when the file has actually been downloaded. In other words, the event is triggered even if it is opened in the browser immediately after clicking or the download is cancelled. Server-side logs or a separate implementation are required to track actual download completion.
GA4 Screen Path: Management → Data Streams → Enhanced Measurements → Toggle ‘Download Files’. In the Report → Events tab, you can check which files were clicked and how many times they were clicked using the file_download event and file_name parameters.
weballin's practical perspective: When distributing a PDF of a consultation application form or a PDF of a surgical consent form on a hospital site, track how many people received the documents through a file download event. Files with a lot of downloads can also be a signal of content value from an SEO perspective.
Key takeaways
- The file_download event is automatically triggered when you click on a link to a major file extension such as PDF, ZIP, or DOC.
- The file_name, file_extension, and link_url parameters are automatically collected.
- Since the event is triggered at the time of click, the number of link clicks is measured rather than the actual download completion.
- Activated with the Enhanced Measurement toggle, no additional GTM setup is required.
- The list of file extensions detected by GA4 can be found in the official documentation, and extensions not in the list require a separate GTM implementation.
