Tracking of an javascript event like this won’t work:
echo <a href=\"javascript:popup_scroll('pdf/datasheet/test.pdf','pop_shop',494,550)\"
class=\"piwik_download\">» Data Sheet</a>";
So I tried that suggestion : Tracking Javascript Events
like this:
function do_it(target) {
popup_scroll(target,'pop_shop',494,550);
piwikTracker.trackLink(target.parentNode.href, 'download');
return false //cancel default action (load link in current window);
}
and
echo "<a href=\"javascript:do_it('/pdf/datasheet/test.pdf')\">» Datenblatt</a>";
The popup works fine, but the download isn’t tracked either
Thanks Mark