In the default tracking code given to you by Piwik, download and outlink tracking is enabled by default. This line of the tracking code does it:
... piwikTracker.enableLinkTracking(); ...
The easiest way to disable all download and outlink tracking is to comment out this line of code; like so:
... //piwikTracker.enableLinkTracking(); ...
If you still need to track some links but not all, an easy way to do it is by using CSS classes. Piwik lets you specify which classes of links will not be tracked.
Note
setIgnoreClasses(string|array)
: This function sets CSS classes to be ignored, if present in the link.
So, if you have a set of links to other sites on a specific page on your site that you want Piwik to ignore, you just have to give them a common CSS class that can be used to tag them. If they have the same CSS class already, and are the only items on the page that do, the current CSS class can be used.
Let's say we created a class...