How to Track PDF Downloads in Google Analytics

Laura Caveney
6th August 2021
Analytics

Using content like eBooks, whitepapers and guides is a great way to obtain contact information for potential leads. Want to track downloads of your content in Google Analytics? We walk you through how to set up download tracking in GA.

Do you have downloadable content on your website? This could be anything from a guide or an eBook to a sales deck or brochure.

If you do have downloadable content on your website, chances are you’ll want to know how often it’s being downloaded.

Tracking downloads of your content is a great way to understand what your audience is interested in and provide more high-value content that kickstart customer journeys.

 

Keep reading to learn:

 

Can downloads be tracked in Google Analytics?

In short, yes! Google Analytics does not automatically track downloads of your content, but it is easy to set up.

While you might be wondering if Google Analytics track PDF views as opposed to content downloads, it’s really not so tricky to track once you have the right tools in place.

 

Why doesn’t Google Analytics automatically track downloads?

Google Analytics is great at tracking website activity. Your landing pages are filled with Javascript. And since GA’s base code is in Javascript, it has no issue tracking this type of content.

The issue with tracking downloads in Google Analytics is that your pdf content doesn’t have any javascript. So there’s nothing for Google Analytics to track.

If you want to track activity that doesn’t use browser-based code, then you just need to do a bit of manual labour to set it up.

 

Before you start tracking downloads

Before we get stuck into how to track downloads in Google Analytics, first we need to talk about gated and ungated content.

 

Gated content 

It’s what it says on the tin. Gated content is downloadable content that requires users to share their contact information in order to gain access.

If you have content that could be great as lead magnets (i.e. content that will really benefit people who have a genuine interest in your product or service), then gated content is a good avenue to try.

But remember, the beauty of gated content is that it is much easier to track.

In terms of volume that is.

Given you’re using a form on your website, you can simply use each submission on your site as a counter. If you’re not sure where to get started, we shared easy-to-follow steps to track form submissions. 

The issue with gated content isn’t tracking the volume of downloads. It’s about tracking the leads generated from that content.  

 

💡 Pro Tip: Track every inbound lead and match their marketing data to their closed revenue and lead data by using Ruler Analytics. You can take all of the manual labour out of your lead tracking.

 

Ungated content 

On the other hand, ungated content is where you offer your content without a need for the user to share their contact information.

While both types are useful, it’s worth testing both out to see how they fare. If you have a really strong piece of content that you know helps start customer journeys, it might be worth sharing that for free. You’ll get more downloads which means more eyeballs on your literature.

And that can never be a bad thing, right?

Unlike gated content, there’s no straightforward or automatic way to count the volume of downloads.

So, let’s go into how you can easily set up Google Analytics to track downloads.

 

 

How to track downloads in Google Analytics

There are three main methods you can use to download your non-gated content, like PDFs. Don’t worry, we’ll walk you through each so you can decide which is the best method for you.

 

Method 1: Add script to your PDF download link 

If you are linking to a PDF that opens in a new window, then it’s fairly easy to add on tracking code.

Your download link will look something like: <a href=”/my-file.pdf” target=”_blank”>Download this PDF</a>

To properly track this in Google Analytics, add the following code to link tag:

<a href=”/my-file.pdf” target=”_blank” onclick=”_gaq.push([‘_trackEvent’,’Download’,’PDF’,this.href]);”>Download this PDF</a>

When a user clicks to download your file, a tracking pixel is requested and recorded in your Google Analytics.

 

 

Method 2: Use a plugin on your website to track downloads 

Site builders like WordPress have a whole host of plugins set up to track PDF downloads for you. To enable download tracking, you might want to use a plugin like MonsterInsights.

Once the plugin is installed, PDF downloads will be tracked as events in your Google Analytics dashboard. The good news with some of these plugins is that you don’t need to do any more work than download and install it.

They’ll do all the hard work to ensure you can track each and every download in Google Analytics.

 

Method 3: Using Google Tag Manager 

If your web builder doesn’t have plugin availability for PDF downloads, then you’ll likely need to use Google Tag Manager to track downloads.

Google Tag Manager allows you to add tags to your website that will allow you to monitor and report back on interaction with any element of your site.

Before you can measure PDF downloads, you’ll need to ensure that anytime someone clicks a link on your website, it will be tracked. A Link Click Listener tag accomplishes this.

 

Step One: Create a link click listener tag

In the Container Overview menu, select New and then Tag and name your tag ‘link click listener’.

Under tag type, select Event Listener and then Link Click Listener.

On the right-hand side of the screen, select +Add and choose All pages. Then save.

link click listener google tag manager track downloads google analytics

 

Now that your link click listener is set up, you want to next hone in on PDF clicks specifically. Next, we’ll need to create a new rule to identify PDF link clicks.

 

Step Two: Create a new rule

In your Container Overview menu click New and then Rule and name the rule “PDF click”

Under Conditions select {{event}}, then equals, and choose gtm.linkClick.

Remember, gtm.linkClick is the item generated by your Link Click Listener tag. Add another condition – {{element url}}, then contains and pdf. Then select save.

This creates a rule that is only met when someone clicks on a link with .pdf in the URL slug.

track downloads in google analytics pdf click google tag manager

 

Step Three: Create a PDF view tag

Lastly, you’ll need to create a “PDF View” tag. This tag will add an event to your Google Analytics account anytime someone clicks on a PDF.

In your Container Overview menu click New, and then Tag and name the tag “Analytics Event – PDF View”

Select “Tag Type” Google Analytics, Universal Analytics. Add your Google Analytics tracking ID to the “Tracking ID” box

Under Track Type select Event. In the “Event Tracking Parameters” assign the following names. These will help organise events within Google Analytics as you add more tags):

Click +Add next to Firing Rules and select pdf click. Then click Save.

Congrats, the tag is now installed! Make sure you test it in the debugger first before making your event in Google Analytics.

 

Step Four: Create an event in Google Analytics

To create an event in Google Analytics for a PDF view, follow these steps:

In your Google Analytics account, select Admin from the primary nav.

Select the property and the view you want to create the goal in (this should be the one whose tracking code you used in Google Tag Manager).

Click Goal and then New Goal. Name the goal ‘PDF view’ and select event under the type selection. Click next.

Under Event Conditions set category equals to micro-conversion and label equals to “pdf-view”. Then, click Save.

And there you have it! You can now track PDF downloads as a goal within Google Analytics

 

How to view PDF downloads in Google Analytics

To view file downloads, log in to your Google Analytics account you wish to track file downloads for.

If you’ve enabled downloads tracking as page views, you can find out the downloads report in the All Pages report along with other blog posts and pages. This report can be accessed by navigating to Behaviour » Site Content » All Pages.

If you’ve enabled downloads tracking as events, you can see the downloads data in your events report.

In your event reports, navigate to Behavior » Events in the left panel. To get a detailed report, click on Top Events. Then, click downloads to get a detailed report.

If you would like to see the full report on your Tag Manager events, click on the Behavior » Events » Overview report in the sidebar of Google Analytics. The Event Action report will show you the exact URLs of the downloaded PDFs.

 

Why measuring content downloads isn’t enough

Ok, so we know measuring content downloads is vital. Without it, you can’t get an idea of what your website visitors are engaging with. It’ll help you understand what content is working, and what isn’t.

But it only tells you part of the story.

While 500 people might download a piece of content on your website in a month, what information are you missing there?

Well, only 250 of those might go on to become a customer. That means you have a piece of highly converting content and do not necessarily know about it.

 

It gets worse. You could be counting your downloads and see only 30 people downloaded that particular eBook in a month. Meanwhile, 200 people downloaded one of your more popular eBooks. But of those 200, only 1 actually converted. So you go about your day thinking the latter is more successful, but it isn’t!

Accessing this data doesn’t need to be hard. It’s all possible with marketing attribution. We wrote a complete guide to attribution that will help you learn how to go beyond lead generation metrics.

 

💡 Pro Tip: Ruler Analytics is the perfect tool to help you get started with efficient tracking of PDF downloads and other lead generation methods. Find out how Ruler will benefit you as a marketer.

 

Wrapping up

So now, you can track PDF downloads in Google Analytics. But remember, while you might count these as new leads they don’t guarantee revenue. And in order to maximise and optimise your marketing, you need to understand which channels, content and campaigns are driving more for your bottom line.

Don’t forget to test out gated content on your audience too. And remember, if you need support on tracking conversions (and viewing your lead’s full customer journey), we can help you track phone calls, track live chat and even track form submissions too.