Google Tag Manager

How to Track PDF File Downloads Via Google Tag Manager?

There is an easy way to track PDF file downloads on a website or blog using Google tag manager. All we have to do is trigger an event when someone clicks on the PDF link. The event data go to Google Analytics, and finally, view how popular PDFs are.

The PDF file can be a story, whitepaper, ebook, how-to PDFs or a valuable research report.

So, let’s get started with tracking PDF file downloads.

Step 0: Pre-Requisites

You should be aware of Google Tag Manager Lingo. Moreover understand what a trigger, tag, and the built-in variables available are.

The next is, you should have a Google Tag Manager for tracking site’s traffic in Google Analytics though it isn’t a must. We will still need to have the Google Analytics Property ID to send scroll depth data to Google Analytics.

If you aren’t sure, refer to my article – How to Connect Google Analytics With Google Tag Manager first and then continue with this article.

Step 1: Create Trigger

  • Trigger name: I have named it asPDF Downloads Trigger. It should be easily identifiable. Name the trigger accordingly.
  • Trigger type: Click – Just Links. This trigger type will track internal link clicks.
  • Trigger fires when: Some Link Clicks > Click URL > ends with > “.pdf”

If you are masking the pdf file download link with short URLs, use the exact url instead of “ends with” condition.

Step 2: Create a Tag

  • Tag name: Name the tag accordingly. I have it as PDF Download Tag.
  • Tag type: Google Analytics – Universal Analytics will be our tag type.
  • Track type: Event (Selected from the drop-down menu list)

Event Tracking Parameters

  • Category: PDF Download Clicks
  • Action: {{Page URL}}
  • Label: {{Click URL}}
  • Value: Leave blank
  • Non-Interaction hit: False
  • Google analytics settings: {{Google Analytics ID}}

Let’s preview the tag now using the Google Tag Manager’s debug mode. Visit the page where a PDF link is embedded in the HTML code. Make sure the link opens up in the new tab. Click the PDF link, and the tag should fire as shown below.

 

View Reports in Google Analytics

Sign in to your Google Analytics account and click Behavior > Events > Overview.

It will show the event category we have added for the tag. It is “PDF Download Tag”.

Under the “PDF Download Tag” event category, we will see the event label with all the PDF file links. Under Action, it will list all the pages where the PDF file download links are embedded.

Also, check out How to Track External Link Clicks and Affiliate Link Clicks Via Google Tag Manager.

Shabbir Bhimani

Blogging Since 2009. If I can leave my high paying C# job in an MNC in the midst of global financial crisis of 2008, anybody can do it. @BizTips I guide programmers and developers to Start and Grow an Online Business. Read more about me here.

Recent Posts

Absolute Beginners Guide to Google Ads

Free Google Ads Tutorial for an absolute beginner covering campaigns and their types, networks, keywords,…

2 years ago

How Freshers Can Make Money Programming in Java

Do you want to make money programming in Java? Here are 6 creative ways for…

3 years ago

Financial Freedom for Freelancers – 9 Smart Ways

9 smart ways for freelancers to achieve financial freedom. First, you have to believe it…

3 years ago

How To Become A Self-Taught Developer

With so many programming languages and resources available, it can be information overall to learn…

3 years ago

Wise Review – Best Exchange Rates For Indian Freelancers

Wise review from an Indian freelancers point of view to receive payments in India. How…

3 years ago

How to Tell a Client you Can’t Lower the Price?

There are 3 types of clients who want you to lower the price. How to…

3 years ago