Fire google analytics events on direct file requests
This module provides the ability to fire google analytics events when files are directly requested (i.e. PDFs)
Client-side approach allows for simple install & negates the need for a separate analytics account (which is required for server-side solutions).
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.
### PDF Tracking ###
RewriteCond %{QUERY_STRING} !processed=1
RewriteRule ^(.*\.pdf)$ file-analytics?seg=$1 [R=302,L,NC]
####################
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem