Don't replace Hrefs for internal links

When using content-tracking the function replaceHrefIfInternalLink (matomo/piwik.js at 82ba03fb2bc5676933517a74293b2be5a242a87a · matomo-org/matomo · GitHub) is called.

This function replaces all internal links that are content-tracked with Matomo Redirects.

How can I disable this behavior in a supported way?
I don’t understand why I need the redirects since there are event receivers tracking the link click anyways (added in the function setupInteractionsTracking). I don’t want the redirects since the URLs just don’t “look” nice for the user and create an additional roundtrip when clicking on regular links.

Did you find a solution to this? It’s such an unfriendly solution. Not to mention, it makes all content entirely reliant on the uptime and resource availability of a given analytics server.

I came across a post that stated it would be removed in version 4 (SEO issue: Content tracking with no redirection), but after upgrading, the behaviour is still the same.

it makes all content entirely reliant on the uptime and resource availability of a given analytics server

This is exactly the problem why I posted this. The analytics server was overwhelmed by all the unnecessary redirects and hence the whole portal being tracked was down / unusable.

Unfortunately no solution, but you found a good post.