Content tracking does currently replace the link in the
a.href when clicking on it (when the link is supposed to be tracked as an interaction). This means we will first load eg
piwik.php?redirect_url=... which then goes to the actual redirect_url. This redirect will track the interaction happened.
However, when there are 2 trackers, the first tracker will replace the actual target URL with
piwik.php?redirect_url=... and the second tracker will track the link like this as an outlink:
Ideally, these redirect_urls can be disabled optionally see #6265, and ideally, when using multiple trackers, we disable them automatically.
The result is for example
0 interactions in the second Piwik, and the interactions are shown in the first piwik.
I am running into the same problems. But this only happens when previously hidden elements are shown. Only the last element of the set of elements which is shown never gets an impression or an interaction.
The other elements get a replacement of the url with the piwik redirect url. The last one does not.
@tsteur did you find a solution?
Not yet, we should definitely remove the
piwik.php redirect and instead track the interaction as a regular tracking request. This will also make the links faster and in general the feature more usable. @mattab this might be even somewhat quick to do and feeling bad for this piwik.php redirect for a long time. Might be something for 3.10 or 3.11
Would you completely remove the feature you mean from the Tracker (which could be useful for other use cases like https://github.com/matomo-org/matomo/issues/6180 and tracking Ads clicks), or more simply "make content interaction tracking send a beacon instead of forcing people through the redirect" (which sounds very good)?
"make content interaction tracking send a beacon instead of forcing people through the redirect"
Yes we would send regular tracking request which falls back to beacon automatically anyway. It'll be still faster than any redirect through Matomo ;)
this might be even somewhat quick to do and feeling bad for this piwik.php redirect for a long time. Might be something for 3.10 or 3.11
definitely :+1: Ideally we would not redirect any call through Matomo as it's too slow & risky. added to 3.10.0 but we could move it back to 3.11.0 later