Process Flow
Animated overview of the full workflow
TL;DR
GA4 tracks file downloads automatically through Enhanced Measurement. When enabled, it captures clicks on links to files with common extensions (pdf, xlsx, docx, csv, zip, etc.) as 'file_download' events. Verify it is working in DebugView or Real-Time reports. If you need to track additional file types or capture custom parameters, use GTM with a custom event.
Step-by-Step Guide
Follow these 3 steps to complete this guide
- 1
Enhanced Measurement (Automatic)
Admin > Data Streams > select stream > Enhanced Measurement. Ensure 'File downloads' is toggled on. GA4 automatically fires a 'file_download' event for links to: pdf, xlsx, xls, docx, doc, csv, txt, rtf, zip, mp3, mp4, mov, avi, wmv, exe.
- 2
Verification
Visit your site and click a downloadable file. Check DebugView or Real-Time > Events for the 'file_download' event. Parameters include file_name, file_extension, and link_url.
- 3
Custom File Download Tracking
If Enhanced Measurement does not cover your file types, use GTM. Create a Click trigger filtered by Click URL containing your file extension. Create a GA4 Event tag with a custom event name and parameters.
Was this guide helpful?
Your feedback helps us improve our guides