After reading (and reading ...) it is not 100% clear to me how this should be done.
Force a click on a link to be recorded as a download in Piwik If you want Piwik to consider a given link as a download, you can add the piwik_download css class to the link: <a href='last.php' class=piwik_download>Link I want to track as a download</a> Note: you can customize and rename the CSS class used to force a click to being recorded as a download: [...] // now all clicks on links with the css class download will be counted as downloads piwikTracker.setDownloadClass( download ); piwikTracker.trackPageView(); [...]
Once you are talking of 'piwik_download', then of 'download'.
Does this mean that Piwik recognize the CSS.class 'piwik_download' as 'download' and records it?
Or is this only a type and it should be always 'piwik_download' or 'downlaod'.
And - must it be always (piwik_)download or can i name the css.class as i want?
Therefore i have to build up the piwik js.code with this won created css.class
I am only asking, because i am building some implementations and widgets dynamically.
By default, Piwik will recognize a number of file extensions as downloads. However, if it's off-site, it's treated as an outlink. Using the class, "piwik_download", will force an off-site download to be treated as a download. setDownloadClass allows you to define your own class names -- let's say you already use the class name, 'download', on links to your downloads.