How to Track PDFs in Google Analytics

how to track PDFs in Google Analytics

When a visitor comes to your website, they leave behind their trail of online behavior through data which shows what content they engaged with and for how long. Marketers are able to then gather this data and create a story about each individual consumer and their purchasing decisions and behavior.

What Does This Mean for Marketers?

With the rise of digital content consumption, marketers are increasingly providing premium content offers that are downloadable to the visitor’s computer in the form of a PDF file. If your site is offering these resources to visitors, you’ll want to know if visitors are actually downloading them.

On the surface, Google Analytics doesn’t support file downloads in the form of tracking. Now, with the help of Google Tag Manager, marketers can track this information.

How to Use Google Tag Manager

Google Tag Manager allows you to add “tags” to your website where necessary that connect with Google Analytics. Simply follow the steps below.

Step One: Install Google Tag Manager

Head over to Google’s page for setup and installation to begin installing Google Tag Manager. After the install, familiarize yourself with its three main components.

  • Rule – A set of conditions
  • Tag – Flags an event where a condition is met
  • Container – holds all of your set conditions and tags

Step Two: Enable a “Link Click Listener” Tag

Next, you’ll want to click on “Variables” in the left panel navigation and click “Configure” under the “Built-in Variables” section.

Make sure that “Click URL” is checked under the “Clicks” section.

Step Three: Create a Tag

  • Click on “Tags” in the left panel and click on “NEW” and name the tag accordingly
  • Configure your tag by clicking on the “Tag Configuration” section
  • Next, choose “Universal Analytics” as your tag type
  • Set Tracking ID (from your Google Analytics account) and Tracking Type to “Event”
  • Event tracking parameters
    • Category – Resource Download
    • Action – Download of PDF
    • Label – {{Click Text}}

Step Four: Create a Trigger

  • Click on the edit icon in the “Triggering” section
    • Click add (New) to create a trigger and name accordingly
  • Configure the trigger
    • Choose “Just Links” as your trigger type under the “Click” section
    • Set up your rule with the dropdowns and text fields: “click URL” “contains” “.pdf”
    • Save the trigger and save the tag

Step Five: Publish and Test

Congratulations! You made it this far. Finally, click the “Publish” button in the top right to publish your event.

Now that your tag is set up, you’ll want to test it to ensure that it’s working as it should be. Try opening an additional browser, logging into Google Analytics, and clicking on the PDF download on your live site to enable the event.

Switch to your Analytics browser and view “Real time events.” You should be able to view the event tracking analytics.

What Does This Track?

Now that you’ve enabled the tag and track function of your PDF file, there’s plenty that you can see, including:

  • The PDF’s page views
  • Unique page views
  • Average time on page
  • Bounce rate
  • Links to the PDF
  • Origin of these links

How Can You Learn More?

We hope this helps your efforts to better market to the needs of your website visitors and users! To dive deeper into tracking PDFs in Google Analytics, check out this helpful post from Moz.

If you have any additional questions, as always, please contact the Sixth City Marketing team. We’ll be happy to help!

Share This Post