For some reason I cannot get the Google Analytics module to track file downloads that originate from fielfield. Is there a way I can insert this code to track downloads into the filefiled links? And my file system needs to be set to private if that matters. It would look like this:

<a href="http://mysite.com/system/files/file.zip" onClick="javascript: pageTracker._trackPageview('/doawnloads/file_1');" >download the file</a>

Comments

quicksketch’s picture

I would recommend using jQuery events rather than placing JavaScript directly in your HTML. But if you want you can accomplish this by overridding theme_filefield_item() in your theme's template.php file, just like any theme function.

quicksketch’s picture

Status: Active » Closed (fixed)