Event Tracking for PDF Download

    Event tracking is needed to identify what people are doing when they visit your website. Events like form fills, button clicks, link clicks to external websites or even PDF downloads help you identify what triggers certain user behavior and brings about more conversions. Every user action can be tracked using Google Tag Manager.

With Google Tag Manager, tracking events has never been easier. Development time is cut down drastically and you don’t need a developer every time you need to install a code as Google Tag Manager takes care of this. Once the setup is done (by placing the code on all pages of website) then no more code needs to be added.

PDF Download

Here we will go through a fairly simple method that can be adopted to track PDF downloads. Google Analytics tracks page views on the website with the help of a tracking pixel on HTML pages. But this is not the case when it comes to PDF downloads.

With the help of Google Tag Manager, we can easily track this information.

Step by Step Guide to Track Events Using Google Tag Manager 

    1. The first step will be to install Google Tag Manager on your website. It is a fairly simple process. You will need to first create an account and container. You will also have to paste the Google Tag Manager code on every page of your website. Ensure that the first piece of code is placed as close to the opening <head> tag as possible and the second piece in the <body> tag.

2.The next step will be to create variables. Choose Variables from the left panel.

3.Click ‘Configure’ under the ‘Built-In Variables’ section

4.Ensure that all the ‘built in variables’ of the types; pages, clicks and forms are checked. With these checkboxes, you can easily enable the most used variables.

5.Click on ‘Tags’ in the left panel navigation to create a Tag

6.Click on ‘NEW’ and name the tag appropriately. Naming the tag using words like ‘Download PDF’, ‘Button Click’, etc. will help identify the tag easily later.

7.Configure your tag by clicking the edit pencil icon in the ‘Tag Configuration’ section

Choose

Tag Type as Universal Google Analytics

Track Type as Event

         Category (Refers to the name/category you would like your action to be organized under) – Downloads

         Action (Refers to the actual action of the event) – PDF Download

         Label (Refers to additional information for events that you want to track) – {{Click Text}}

Non – Interaction Hit as True

Google Analytics Settings

Select -> New Variable – Add Google analytics tracking UA code

Tracking Code as Google UA Code

Tag configuration will resemble this

8.Create the trigger by clicking the edit pencil icon in the ‘Triggers’ section

9.Click ‘+’ (New) to create your trigger and name appropriately

10.Configure the trigger by clicking the edit pencil icon in the ‘Trigger Configuration’ section

Choose

‘Click – All Elements ’ as your trigger type under the ‘Click’ section

This trigger fires on: Some Clicks

Setup your rule with the drop downs and text fields: ‘click URL’ ‘contains’ ‘.pdf’

Save the trigger.

Trigger configuration will resemble this


Now you can publish the tag.

To check if the tags are firing correctly click on the PDF download link on your live site to trigger the event.

You can view Google Tag Manager in ‘Preview Mode’ so you can debug and test with real-time tracking in Google Analytics.

Navigate to the Google Analytics window and click on ‘Real time events’. Here you will see the event tracking analytics.

If the event has been setup correctly then the event category and event action will be displayed in Google Analytics as seen below.


If the events are firing correctly in the Preview environment, then you can publish your tag.

And now you are all set.

Stay in Touch

Get In Touch 

Contact Information

Follow Us On

Start typing and press Enter to search