OK. So, if I have understood correctly the value of the data-content-target attribute in the above context is merely a copied link with no functionality of its own. Is this correct?
On the same page, a reference is made to the difference between links with the same domain, links that are either outlinks or downloads, and links that point to anchors. What I have been able to understand with some degree of confidence is the following:
If link tracking is not enabled, then
- Target links having the same domain are redirected to the piwik.php file before they are made available to the interacting user and
- Outlinks and links that point to anchors and downloads are not redirected and their reported information is handled via the XHR event object.
QUESTION: What happens when link-tracking is enabled.
The passages in question are provided below. Perhaps someone is better able to sort through the confusion than I.
The way we track interactions varies based on the type of the link.
Links to the same domain
In case we detect a link element having an href attribute to the same domain as the current page we will replace the href attribute with a link to the piwik.php tracker URL. Whenever a user clicks on such a link we will first send the user to the piwik.php of your Matomo installation and then redirect the user from there to the actual page. This makes sure to track an interaction even if someone opens the URL with a right click.
If the URL of the replaced href attribute changes meanwhile by your code we will respect the new link.
Note: The referrer information will get lost when redirecting from piwik.php to your page. If you depend on this you need to disable automatic tracking of an interaction see below.
Outlinks and downloads
Outlinks and downloads are handled as before via XHR. If a user clicks on a download or outlink we will track this action as usual along with some information related to the content interaction. If link tracking is not enabled we will track downloads having the same domain via piwik.php and all others via XHR.
Tracking via XHR can delay loading a new page by a few hundred ms as we have to track the outlink before moving the user to the new page.
Anchor and all other kind of links will be tracked using an XHR.