Blog

+ Free advice and other musings

How to create a GA4 report showing File Downloads by Filename

by | Apr 15, 2024 | Google Analytics

The default GA4 Engagement > Events report does offer a way to drilldown to see file_downloads. But, like the drilldown for click, there is key information missing.

Want to know which files were downloaded? Take the following steps to enhance your file downloads report.

  1. From the Reports section, click on Library (bottom left). Next click “Create new report” then “Create detail report.” Select “blank report.”
  2. On the right, click on Dimensions and add “File name” and “File extension”, then click Apply.
  3. Next click on Metrics and add “Event Count” and click Apply.
  4. In the upper right, “Save” this report and call it something like “File downloads.”

The resulting report is almost done. You will notice that the first line of the report has no filename but a whole bunch of events counted, whereas the following lines actually show filenames and event count (aka number of downloads). Basically this report is an All Events report in disguise. Because we used “File name” as the dimension, it is showing us events with a filename. Every event without a filename is being rolled up into that first row.

You can use this report as is and add it to one of your published Collections. Or you can create a custom metric called “Downloads” and use that instead of “Event Count.”

Here’s how to add the good-enough report into the left-hand navigation so it’s easy to access.

  1. Click on Library (bottom left). Find the Life cycle collection box, and click on “Edit collection.”
  2. Scroll to find the report you just created, or use the search box. Drag the report from the right column into the left column under Engagement.
  3. Click “Save”, then “Save changes to the current collection.”

Now you will see the File Downloads report under the Engagement section in your Reports menu.

Want to remove that top line of non-file_download events? To do that, you need to make a Custom Metric, then edit the report you just created.

Here’s how to add a Custom Metric “Downloads” that can replace “Event Count” in your File downloads report.

  1. Go to Admin and click on Events.
  2. Click “Modify event” and then “Create.”
  3. Enter the below values and click “Add modification.”

What you are doing in the above step is modifying the file_download event by adding a parameter that records a value of “1” each time a file is downloaded. We can then use that parameter to create a custom metric called “Downloads”.

Ready? Next step is to create that custom metric.

  1. In Admin, click “Custom definitions.” Select “Custom metrics” and click “New custom metric.” Set up the metric with the details in the screenshot below. (Metric name: Downloads. Scope: Event. Event parameter: file_download_count.)

Almost there! Now, you want to swap “Event Count” for “Downloads” in the report you created.

  1. Go to Reports > Engagement > File Downloads and click the pencil icon in the upper right.
  2. Click on “Metrics” and then “Add metric.” Select your custom metric “Downloads.”
  3. Remove “Event Count” by clicking the “x”.
  4. Click “Save” and “Save changes to current report.”

Ta da! Now your report shows file names and the number of downloads.

Want to enhance your Engagement > Events > click report to see what outbound URL was clicked? Here’s how.

You may also like …

How to See What Outbound Link Was Clicked in GA4

How to See What Outbound Link Was Clicked in GA4

If you have outbound click tracking enabled (Admin > Data Streams > Enhanced measurement: toggle on click), then you may notice that the Standard Engagement > Events report is missing helpful information like what link was click. You can view this information...

read more