Tracking clicks on images, downloads and outbound links

Hi guys,
i installed today Piwik but i can’t track images, downloads and outbound links by default settings.

For the downloads and the links i found in this forum Javascript codes which work.
( <a href=“downloads/blabla.pdf” target="_blank" onClick=“javascript:_paq.push([“trackLink”, this.href, ‘download’]);”>blablabla
<a href=“” target="_blank" onClick=“javascript:_paq.push([‘setLinkClasses’, “external”]);”>blablablab )

But for the images i couldn’t find a solution.

Does anybody know where i get the javascript code for the image tracking?


Ok, I’ve found out how to track image views:

<a href="…/images/bla.jpg" target="_blank" onClick=“javascript:_paq.push([“trackLink”, this.href, ‘download’]);”>

But is there any solution which allows tracking all this stuff automatically without adding codes?

Sorry, I am just starting with html, css and javascript.

have you seen the Javascript tracking guide at: JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3