How To Track Downloads In Google Analytics?

Does your website offer downloads’ like a whitepaper or an ebook or any other files?

If so, then you must be keen to track and know how many times site visitors download them and see the content.

This will help you figure out which downloads’ are liked by the visitors and why; and what kind of content interests them.

This is where Google Analytics can come to your assistance. Though it does not track them automatically it can be set-up to track them automatically.


That’s because the base in Google Analytics is built in JavaScript. This allows it to track only those files that execute JavaScript.

For instance, it loves to track pageviews. This is because web pages execute JavaScript when they get loaded in your browser.


Google Analytics offers a number of options for tracking file downloads’. However, this will depend on your website’ set-up and resources.

Here is how you should track downloads’ in Google Analytics.


If your website features downloadable content, it does so vide a clickable button. This is coded to either of the following two buttons.

  • ‘Kickstart the Download’ OR
  • ‘Open a version of the download in a new window or tab’

There are occasions when your website might have just one or a few downloads that you would like to track. This can be done by adding a tracking code (JAVASCRIPT) into the HTML of your website.

You will get to

  • Track the clicks of the button that triggers a download.
  • Tell Google Analytics to record a piece of user behavior that does not trigger the tracking code that it tracks.

But for this, you need to set it up. All that needs to be done is add some script to the download button code.


  • Within the HTML, locate the button on your website. That is, the button that prompts visitors to download content.
  • ‘Download the PDF’ is that text that will appear on the button.


To track clicks of the above button in Google Analytics, you need to add code.


  • Save the HTML.
  • Refresh the page. This will make sure it still looks the same.

After the code is written on the button, just click it. Later Google Analytics will track and record it.

When you next log into your Google Analytics account, you can view the results of the download button tracking.

The code written on your website to track downloads will enable download tracking as page views.

To get downloads report, you need to navigate to:

  • Behavior
  • Site Content
  • All Pages


This option will be suitable if you want to track all downloads on your website instead of manually adding code to each file links on your website.

All that needs to be done is to add Tracking Automation using Google Tag Manager.

Here’s the step-by-step of how to tell Google Tag Manager to track when someone clicks a link on your website: 

  • Click New Tag in your Container Overview Menu. Then specify it is as a Universal Analytics (UA) Tag. Name the tag as ‘Link ABD Listener’.
  • You will be prompted to ‘Choose A Trigger’. Just click + in the top right corner.
  • Click ‘Trigger Configuration’ box. Then select ‘Just Links’ that is present within the ‘CLICK’ category.
  • Select ‘Some Click Links’ under ‘This Trigger Fires On’.

When all is done correctly, you will be able to select the conditions. That is, under which conditions you want the TRIGGER to fire.

  • Select the URL in the first box. This will prompt downloads on your website.
  • Select ‘Matches RegEx’ in the second box.
  • Type the Extension Name, in the third box, of whatever File Type you would like to track.

For example, if you are tracking PDF downloads’, your third box should display, “.pdf’, OR if you are tracking JPG downloads’, it should display, ‘.jpg’.

Once all is done properly, it means you have created a Trigger. Next, click ‘SAVE’ button. This will allow you to save the trigger.

If any visitor to your site clicks a link containing ‘.pdf OR ‘.jpg’, the TRIGGER will act. This results in an action which will record a download event in Google Analytics.

With the help of Google Tag Manager, you can

  • Add Tags to your Website. The site can be associated with any element.
  • Create an Event Trigger. This will help you track your downloads when you already have GTM on your website. Whenever a visitor clicks on your download link, Event Trigger will record an event in Google Analytics.


Google Analytics Version 4 has a built-in download tracking which Universal Analytics does not.

This will allow you to turn on download tracking. But it will be a problem for many users to work out how those downloads’ get reported; and where exactly to find that data.

Now, if you have turned on file download tracking, Google Analytics will report the download numbers in its Events report.

Related Posts

How Going Digital Can Help Start-up Healthcare Companies?

How Going Digital Can Help Start-up Healthcare Companies?

For healthcare startups, success is never easy, for there are already established players in the marketplace with a strong presence. However, ever since digital marketing has come…

Enable Google Analytics Demo Account - Rank On SEO

How To Enable Google Analytics Demo Account?

A Google Analytics Demo Account is very useful. It comes in handy for a variety of reasons. Like testing how to implement a new feature; OR showing…

What are the options for filtering data in google analytics

What are the options for filtering data in google analytics?

Filters are a powerful weapon. By using them, you can control the data included in your reports. What makes them different from segments is that unlike segments…

Which Tags Are Standard Google Analytics Campaign Parameters

Which Tags Are Standard Google Analytics Campaign Parameters?

Google Analytics tracks, reports, and measures activities that occur on your website. To do it, is anything required to be done? Yes, you need to place some…

When Creating A Goal In Google Analytics Which Are Required

When Creating A Goal In Google Analytics Which Are Required?

You may wonder why Goals in Google Analytics is important. That’s because when you invest your money in your website, you would want to get the most…

how to install google analytics on godaddy website - Rank on SEO

How To Install Google Analytics On Go Daddy Website?

GoDaddy is a popular hosting and domain products provider. Additionally, it also provides a website builder which contains everything that is required to create a beautiful website….

Leave a Reply