Report on File Downloads in GA4

Some of the automatic events GA4 logs for your website are hard to report on in GA4. The one we’re going to look at today is the file download event. We’ll look at what you can report on in GA4 and create an exploration to get more detail. Then we’re going to set up a custom metric to count file downloads and make a custom GA4 report for file downloads look great.

So let’s have a look.

Create a GA4 Report Showing File Downloads

Since we don’t have a standard report that shows file downloads, we’re going to create one and save it into the Reports menu. In doing so, you’ll see one of the limitations with reporting on file downloads and regular reports. Later, we’ll create a custom metric for reporting on file downloads, which will make this custom report in GA4 a little bit nicer to look at.

  1. Go to the Reports section in GA4, and click on the “Library” icon in the bottom left corner. To add a new report, click “Create new report”, then click “Create detail report”, and start with a blank report. 
  2. On the right, click on Dimensions and add “File name” and “File extension” and then click Apply. 
  3. Click Metrics. Unfortunately, there is not a built in metric related to file downloads, that’s what we’re going to be creating. For now, add “Event Count” and then click Apply.
  4. In the upper right, “Save” this report as “File Downloads”. 

Now we have a taste of what this report is going to look like. It would be really nice if we could add a filter for event name–then we could filter for just file downloads. But we can’t. 

That means we see one line in the report table with a whole bunch of events counted. Most events in the website are not file downloads and so don’t have file names associated with them. Once we create our custom metric, we will be able to get rid of that line. 

Now let’s add the report into the Reports menu.

  1. Click back to return to the Library. Find the Life cycle collection box, and click on “Edit collection”.
  2. In the search box, find the report you just created and drag it down to the bottom of the Engagement menu. 
  3. Save, select “Save changes to the current collection” and click the back button. 

Now you’ll see the File downloads report under the Engagement section of your Reports menu. 

This gives you the ability to show file downloads without doing any further customization. If you’d like to remove that extra line on the report that includes non-file_download events, skip down to the Custom Metric section of this blog.

Use Explorations to Do Report on File Downloads

Now let’s have a look at what we can do in Explorations where there is a little bit more control. 

  1. Go to Explorations and click Blank.
  2. On the left-most column, under Dimensions, add File name, File extension, and Event name. Then drag File name and File extension into the middle column under Rows.
  3. Drag Event name to the middle column under Filter. Select “exactly matches”, and select file_download. Click Apply.
  4. On the left-most column, under Metrics, add Total users and Event count. Then drag them into the middle column under Values.

You’ll see a table listing each file name, its event count, and the total users. This data is filtered for just events that are file download events, so that’s an advantage over the custom report we created above.

Add a Custom Metric for File Download

Another way we can customize GA4 to get a better file download report is to create a custom metric that counts file downloads. We’re going to be modifying an existing event, GA4’s automatic file_download event, by adding a parameter to it which records a “1” every time a file download happens. And then we’ll add the metric to the file download report we made above.

One note, custom metrics start collecting data when you set them up, and don’t apply to historical data.

  1. Go to Admin and click on Events. Click “Modify event” and then “Create”.
  2. Click “Create”. Enter the values below and click “Add modification”.
file download event modification
  1. In Admin, go back to Custom definitions. Select Custom metrics, and click “New custom metric”.
  2. Set up the metric with these entries:
new custom metric downloads
  1. Find the File download report you created earlier in Reports > Engagement. Click the pencil icon in the upper right.
  2. Click on Metrics and then “Add metric”. Select your custom metric “Downloads”. 
  3. We can remove Event count, we don’t need that any more. Click the “x” to remove Event count. 
ga4 file download report with downloads count

Now your report only shows rows for file download events and counts the number of downloads.

We’ve got loads more GA4 and Looker Studio videos & tutorials, check them out on our GA4 tutorials page.

Share This Post

Share This Post

Page Value in GA4

GA4 doesn’t have a metric that is comparable to the Page Value metric from Universal Analytics. In this post, we will recreate the metric using GA4 data in Google BigQuery. Google defined the UA metric as:Page Value is the average value for a page that a user visited before landing on the goal page or completing an Ecommerce transaction (or both).

➔ Read more

master GA4

with personalized training

A training program like no other. Work with expert marketers for 1:1 training to maximize learning & impact.

have you registered?

Our next free digital marketing seminar is coming soon!

[MEC id="946"]