I'm not sure if anyone has used Matomo for analytics, but I've had some difficulties getting some of the events to work. Specifically I have pages with a FAQ/Answer layout with a bunch of questions at the top, which link to answers further down the page. I've set it up this way so I can track which questions get clicked on more.

One of the issues with Matomo is that it doesn't track links within the same page automatically, as far as I can tell. Hopefully there's an easier way, but I ended up creating a script that sends data to matomo when the link is clicked. There were a few issues as the script needs to run after the document is loaded, but after all of the Xara code. Anyway, in case it helps someone else here is the script I used:

Code:
<script>

function AddClicks() {
	var l = document.links;
	for(var i=0; i<l.length; i++) {	
		l[i].addEventListener('click', MyClick,false); 
	}
}

function AddClicksInit() {
	setTimeout(function() { AddClicks(); }, 500);
}
	
function MyClick(event)
{
	if (typeof(event) == "undefined") { return;}
	var target = ''+event.target;
	var name = target.substr(target.lastIndexOf('/')+1);
	_paq.push(['trackEvent', 'DynamicClicks', 'Click',name]);
}

window.addEventListener("load", AddClicksInit);
window.addEventListener("resize", AddClicks);
</script>
In my case it automatically names the clicks based on the name of the page and the xara name/anchor. Note that the names are different for the different variants, and if you have pages with the same name but located in different folders that could be an issue. It need to be in the <body> section of the website.

Anyway, hope that helps someone.