Tracking PDF Downloads with Google Analytics

There are two methods to achieve tracking PDF downloads on your website using Google Analytics. The first requires access to your website and amending the LINKS. The second and best method is to set up Event Tracking in Google Analytics Dashboard so the PDF is tracked as a page view.

  1. Amending the Link To A PDF

Access the web page with the download link for your PDF file and amend the A HREF command to include the ONCLICK instruction below highlighted in RED. Note it is always good practice to open a PDF in a New Window, this what the target=”_blank” command does.

Download My file

  1. Configuring Tracking As A Page View

First you need to sign up for GOOGLE TAG MANAGER at https://www.google.com/analytics/tag-manager/

You will receive a GOOGLE TAG MANAGER CODE to install in the BODY of the web page.

Now select TRIGGERS from the left hand menu and click NEW to create the TRIGGER

Tracking-PDF-Downloads-With-Google-Analytics-1

Select CLICK

Now configure the CLICK for JUST TAGS with a MAX WAIT of 2000 milliseconds and CONTINUE

Tracking-PDF-Downloads-With-Google-Analytics-2

We now configure the TRIGGER just for PDF downloads

Select PAGE URL > select matches REGEx (Ignorecase) > add \.pdf

Then Continue

Tracking-PDF-Downloads-With-Google-Analytics-2-1

We now need to Fire this on ALL CLICKS

Tracking-PDF-Downloads-With-Google-Analytics-3

Create the Trigger & Save It

Tracking-PDF-Downloads-With-Google-Analytics-3-1

Now we need to create the TAG to record this as a Virtual Pageview

Select TAGS from the left hand menu and NEW

Now select GOOGLE ANALYTICS and select it to UNIVERSAL and continue

Tracking-PDF-Downloads-With-Google-Analytics-3-2

Now we configure the TAG

Enter your Google Tracking ID and select PAGE VIEWS and click on MORE SETTINGS, then select Fields to Set

Tracking-PDF-Downloads-With-Google-Analytics-4

Now ADD FIELD

Enter Field Name as page and the value as {{click URL}} then continue.

Tracking-PDF-Downloads-With-Google-Analytics-4-1

Now ensure you set the FIRE ON to CLICK and in the pop up box Tick PDFs and Save

Tracking-PDF-Downloads-With-Google-Analytics-4-2

You now have set the TAG click on Create TAG

Tracking-PDF-Downloads-With-Google-Analytics-4-3

Label it and SAVE

Tracking-PDF-Downloads-With-Google-Analytics-4-4

Other Web Design Articles You May Like

Touch Base With Us

Let’s Talk About How Web Design Can Get You Noticed
Betelguise Web Design

Lasyard House, Underhill Street
Bridgnorth, Shropshire, WV16 4BB

Telephone : 01746 250500
Email : 

ukwda
wwdc

About My Work

Phasellus non ante ac dui sagittis volutpat. Curabitur a quam nisl. Nam est elit, congue et quam id, laoreet consequat erat. Aenean porta placerat efficitur. Vestibulum et dictum massa, ac finibus turpis.

Recent Works

Recent Posts