Free Search Engine Visibility Report

Newsletter Sign Up

First Name:

Last Name:

Email:

 

SEO Client
Results

Don't take our word for it, see our SEO results for yourself. When selecting a SEO firm make sure to ask for examples of their rankings. We only employ ethical SEO practices (white hat SEO practices) to achieve the best results for our clients.

View Results »

Tracking PDF Downloads in Google Analytics

http://www.morevisibility.com/analyticsblog/tracking-pdf-downloads-in-google-analytics.html August 5th, 2009 by Joe Teixeira

PDF Files are no doubt a part of your website. Sure, they’re not HTML, PHP, or ASP pages, but they are files that contain information that is just as valuable as any other page on your website. So, why not track PDF files in Google Analytics, too?

At MoreVisibility, we see a lot of websites out there using Google Analytics that are not tracking their PDF Files as either pageviews or events – both of which are possible to do. The best part about it is that it’s very easy to configure, which is good news for any person on your IT / technical team.

To track any PDF file on your website, simply follow the quick steps below and you’ll be well on your way. It gets a bit technical from here on out, so roll up your sleeves and put your hard hats on.

1. Find a page that links to one of your PDF files.

2. Find where the PDF file is on the page – look for the anchor (<a>) tag. It should look something like this:

<a href="files/quarterly-earnings.pdf" target="_blank">Quarterly Earnings Report</a>

3. Insert the following “onClick” event within this anchor tag. It should look like this:

<a href="files/quarterly-earnings.pdf" target="_blank" onClick="pageTracker._trackPageview('/files/quarterly-earnings.pdf');">Quarterly Earnings Report</a>

4. Upload the page and enjoy the results! You should see the number of times that your PDF file was accessed within the Content >> Top Content section of your Google Analytics profile.

Tracking a PDF Download as an Event (vs. as a Pageview)
To track your PDF Downloads as Events, simply use the _trackEvent function instead of the _trackPageview function, like so:

<a href="files/quarterly-earnings.pdf" target="_blank" onClick="pageTracker._trackEvent("PDF Files", "Downloads", "Quarterly Earnings Report", "500");">Quarterly Earnings Report</a>

(Learn all about Event Tracking with my latest blog post from last week)

The activity that occurred on your PDF Files will be within the Event Tracking section, which is a sub-section of the Content section of reports, instead of in the Top Content report.

Is there a difference between tracking PDF files as Pageviews or as Events?
Other than the obvious fact that one way will count them as a pageview, while the other way will count them as an event, the biggest difference between the two is the ability to track Goals. As of today, Google Analytics does not have the ability to track Events as Goals, so if you were planning to track all PDF downloads as Goals, you will need to track them as Pageviews, and not as Events. Advanced Segments are now available for Events, but they are not the same as Goals.

So what are you waiting for? Grab your webmaster and start tracking your PDF files with Google Analytics!

Posted in Google Analytics, Web Analytics | No Comments » |

Comments are closed at this time.


Subscribe rss feed Login or Register

Recent Articles

Article Categories

Articles by Month

Related Sites


Inc 5000 Google Analytics Authorized Consultant Google Qualified Company Microsoft adExcellence Member Greenified 2009

MoreVisibility
925 South Federal Highway, Suite 750
Boca Raton, FL 33432 www.morevisibility.com

800.787.0497

ph: 561.620.9682

fx:  561.620.9684


© 1999 - 2012 MoreVisibility ® All Rights Reserved. Privacy | Legal

MoreVisibility Social Networking Links Google+ YouTube LinkedIn Facebook Twitter