Tracking file downloads in GA4


9 mins

File downloads in GA4

Table of Contents

Google Analytics 4, or GA4, first came out in October 2020 and was designed to supplant Universal Analytics as Google’s default measurement solution.

GA4 offers predictive insights and more seamless integration with Google Ads. Aside from page views, you can use it to track additional events, including file downloads.

There’s no doubt that GA4 is a powerful marketing tool, but using it can get a bit tricky. To illustrate, its interface does not show a native report for downloaded files, at least beyond the last 30 minutes.

That said, tracking file downloads in GA4 is possible. Read on to find out how.

How to track file downloads in Google Analytics 4

Before we get to the nitty-gritty of tracking file downloads in GA4, let’s take a few steps back. First, why did Google decide to deprecate Universal Analytics?

Universal Analytics is quite powerful in its own right, as it was optimised for today’s generation of online measurement. However, it has a number of flaws that ultimately led to its impending demise:

  • It was built for desktop web
  • It relies on independent sessions
  • It uses observable data from cookies

With the GA4, Google removed all the above weaknesses and even added a few more improvements. The most notable one is that it does not store IP addresses, which keeps it from running afoul of current privacy regulations.

If you haven’t had the chance to set up your GA4 properties yet, you should get to it now.

It’s best to begin tracking the key metrics as soon as possible.

This way, you get the chance to familiarise yourself with the new interface and the added capabilities. By the time Analytics is no longer available, you will be ready to handle the transition for your business and not miss a beat.

A good place to start is learning how to track file downloads with GA4’s Enhanced Measurement feature. It will come in handy if you have e-books, worksheets, user manuals, and other types of downloadable content on your website.

Just follow these steps to generate the report.

Turn on file downloads

First things first, make sure that the File Downloads function of the Enhanced Measurement feature is active. This should be on in the default setting, but you can check just to make sure.

To do this, log onto your GA4 account and open the admin panel. It’s the icon at the lower left corner of the screen that looks like a gear.

Next, click on Setup Assistant and then select Data Streams. From there, click on the name of your website.

Look for the Enhanced Measurement function. It should say two things:

  • Automatically measure interactions and content on your sites in addition to standard page view measurement.
  • Data from on-page elements such as links and embedded videos may be collected with relevant events. You must ensure that no personally identifiable information will be sent to Google.

Make sure that it is enabled.

After this, see to it that the File Downloads option is visible. If not, click on the gear icon to the right of the listed items and enable File Downloads.

Note that this change will not take effect immediately. You’ll have to wait 24 hours before you can start seeing the data, whether in standard or custom reports.

How to find downloads

If you opt to use standard reports, you’ll find that it’s fairly easy to find the file download events. Simply go to Reports, scroll down and select Engagement. Then, click on Events. The file downloads are under the events name “file_download.”

However, note that this method is a bit limited when it comes to granularity. That is because it does not tell you what kinds of files were downloaded.

If you want to see specific details like this, you need to create a custom report in the Explore section.

Things are a bit more complicated if you use custom reports, but we’ve got you covered in the next section.

Create a custom report or exploration

Creating an Exploration is just another way of saying generate a custom chart. To do this, look at the left sidebar of the GA4 interface and click on the Explore option. Next, click on the plus sign to create a blank exploration.

You can change the name of the report at the top left part of the screen. Try to use something easy for you to distinguish, like “Downloads.”

Adding variables to your custom report

At the left side of the screen is the Variables column, where you’ll find areas for dimensions and metrics.

The selection for dimensions includes the Event name, File name, and File extension. Add the File name option by clicking on it and then the blue “Import” button at the upper right-hand corner.

The metrics selection includes Event count and Event count per user. Choose the Event count for your metrics and import it too.

Adding the exploration to the tab settings

At this point, you have updated your report’s variables like file name, metrics, and dimensions. It is now ready to be moved to the Tab Settings column.

To do this, simply follow the steps below:

  1. Click on the icon that looks like a horizontal bar graph. It should be right below the Visualization section, which is somewhere close to the top of the column. Doing this shows options like Segment Comparison, Breakdowns, Values, and Filters.
  2. Next, click on the file name of your report in the Variables column and drag it to the Breakdown option in the Tab Settings column.
  3. After this, click on the Event count on the left column and drag it to the Values option in the right column.

Setting the filters

The next step is to set the filters for your report. This way, only the file downloads will be included in the graph.
Follow the steps below to set up the filter:

  1. First, go to the Filters section in the Tab Settings column and drag the event name to it.
  2. Next, choose the “exactly matches” option from the first drop-down selection.
  3. After this, set the text box below it to “file_download.”
  4. Finally, click on Apply to make sure that your changes are finalised.

Once you have done this, you should see a bar graph to the right of the screen. The file names of the downloaded content serve as the coordinates for the y-axis. On the other hand, the number of downloads makes up the x-axis coordinates.

Note that if your file names are long, they might be a bit hard to read. The good thing is that you can export this custom report later on to a spreadsheet, where everything is easier to read.

Setting the date range and data retention

The only thing that is left to do at this point is to define the date range and the time frame for the graph.

You can set the parameters for the date of the data in the custom section, which is right below the exploration name. You can also set the window for data retention in the Variable column. However, in its default setting, you could only select the last 60 days of information.

Fortunately, you can extend this to as far as 14 months, but you would have to go to the admin settings. Click on the gear icon and go to Data Settings. Next, select Data Retention and then change it to the maximum value of 14 months.

After making all these changes, you should be able to generate a report of download events where each file is specified, along with metrics like event count. The default setting displays ten rows, but you can change it in the Rows section by increasing “Show rows.”

Other things to consider

The 14-month limitation on the data retention range is a bit narrow, but there are currently no plans to extend it. There is also a 100-character limitation on the filename, so if you use something longer, it will be cropped, even when you export the report.

Hopefully, Google will improve on these things as time goes by.

Also, it is important to note that just because something is downloadable does not automatically mean it will be included in the report. For instance, if the link to the content is in your email, GA4 won’t count it.

Another exception to the tracking process is the lead magnet. If people fill in their name and email address to download the file, you should track it with a tool that is designed for lead generation.

Finally, if the content is downloadable from your Google Drive or Dropbox, it will be counted as an Outbound click event.

Files are effective pieces of content because your visitors can keep a copy and view it anytime, even without an internet connection. So, naturally, incorporating them into your website is a sound marketing strategy.

That is why tracking file downloads in GA4 is important. It gives you a bird’s eye view of which types of content work and which ones don’t.

However, note that there is a lot more work to be done to get a clearer picture of which channels, campaigns, and content increase your bottom line. So make sure that you explore GA4 more thoroughly and consider using our Google Analytics Reporting Features here at Reporting Ninja.

With our Google Analytics Reporting Tool, you can create templates for commonly used reports within two minutes, analyse traffic channels, track KPIs, and more.

Sign up now for a free trial!

Reporting Ninja
Post written by