The file_download event (eg. for PDFs) is another event that’s automatically tracked through Enhanced Measurement.
There are 2 big caveats to this tracking:
- GA4 is only tracking the act of a user clicking a link from your website to a file. It can’t automatically track the user trying to access the file itself (eg. if they’ve bookmarked it) because only HTML pages can run the GA4 tracker, a PDF can’t. So your data is best thought of as clicks to files. There are some more advanced ways of tracking the actual file access but it involves server-side coding and so is only worth it if it’s a huge part of your website.
- The link has to be direct to the file. Some websites use a redirect (eg. mysite.com.au/download/12345) in which case you will probably need to implement the file_download event manually. It may not be possible to extract the file name from the link in some cases, in our example the link is only an ID not the actual file name.
The main dimensions tracked are the file name and the file extension. But the file extension dimension is only going to be relevant if downloads are a big part of your website and you have multiple extensions in which case you might want to see the data by file extension.
Otherwise the main report you’d want to see is top downloads by file name. One of the most common use cases is to find out which of your PDF sales or product brochures are getting the most attention. You can use this tracking to work out if people who download files are more likely to convert or even to create a remarketing list of prospects who have downloaded a PDF.
