Google Analytics: Track PDF links on webpage

Tracking on various links on your webpage is very important from Marketing perspective. It provides up critical information on how success you online campaign is and whether it attracts the intended audience. There are many tools/services available today that enables you to track pages, for instance, Google Analytics. We can leverage such services to a deeper level to even do tracking at page events level. For example, tracking clicks on hyperlinks or to be more specific PDF links on your web page. Below is the sample javascript code to help you track PDF:

Note: You need to include ga.js & jQuery (mentioned below) to you page for leveraging this code in HEAD section of HTML.

This method can be used as base for tracking on other minute level like a particular url click, download, hover event and so on.

Enjoy!!