Requirements

SilverStripe 3.1

Page must properly include jquery & google analytics (Classic, ga.js)

Installation

For apache, your .htaccess file will need to reroute requests to PDFs so they can hit a server-side FileAnalyticsController
The RewriteRule is skipped query string for processed=1; this query string is provided by the JS redirect after tracking the event.