Skip to content
weballin

weballin DIGIWIKI

File Download

File download is an enhanced measurement event in GA4, and the file_download event is automatically triggered when clicking on a file link such as PDF, ZIP, or DOC. It is collected when a link is clicked, and you can check which file was downloaded using the file_name parameter.

weballin

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.

References

Frequently asked questions

I turned on file download with enhanced measurement, but the event is not recorded.

GA4 enhanced measurement are only detected when the href attribute of the <a> tag includes the file extension. Downloads implemented with dynamic links or buttons (button tags) created in JavaScript are not automatically detected. In this case, use the GTM link click trigger to additionally set it as a custom event.

Should I set file download as a key event?

It depends on the business. If a consultation application or important brochure download is related to lead generation, it is meaningful to mark it as a key event. It is appropriate to analyze simple reference material downloads as a content consumption indicator rather than a key event.