I tried to do this with Piwik, and figured out that it might be a good idea to use the trackLink function. So I added some tag like
as I found in the Piwik documentation. This works in a way now, but the hits are all treated as “Outgoing links” in Piwik, so they don’t show up in the “Pages” overview, but in the “Outgoing links” tab.
I understand this might be by design because in the documentation it sounded like “use this function for logging external links and downloads”, but I don’t see the reason for this. Wouldn’t it be better to filter links by domain, as it is done with “normal” page clicks, so that links to “mydomain.org” will always show on the “Pages” tab? The current situation doesn’t seem to make too much sense to me because I can’t imagine why somebody would want to see internal links on the “Outgoing links” page.
Is there a better method to do what I’m trying to achieve? Any suggestions would be very much appreciated.