Set up (web)
Download links (PDF, AVI, WMV)
You can modify your HTML to track clicks on links that lead to downloadable files, like PDFs, using one of the following:
Event Tracking lets you track clicks on individual links independently from the page or screen that’s hosting the element. You can also capture important metadata about different links when you use Event tracking, so you can analyze how well different types of links perform. Learn more about Event tracking.
Virtual page or screen views
When you set up a virtual page or screen view to track a link, Google Analytics counts a new page or screen view when a user clicks the link. This is usually referred to as a virtual page or screen view because the interaction gets counted as page or screen that’s completely independent from the page or screen that is hosting the link. Learn more about how to track page and screen views in our Developer Guides:
- Websites: Universal Analytics (if using analytics.js) and Classic Analytics (if using ga.js)
The changes you need to make depend on which tracking code you’re using. See if you have Classic Analytics (ga.js) or Universal Analytics (analytics.js).
- Mobile apps: Android and iOS