@sgiehl opened this Issue on August 22nd 2022 Member

This is a follow-up issue to the discussion in #18612


When a visitor visits the page, the visit will be attributed to a certain referrer. This can currently be website, campaign, search engine or social network. If non of this referrer can be detected the visit will be attributed as direct.

When a visitor afterwards revisits the page coming from another referrer and the referrer was previously attributed as direct, we currently may update the attribution to this new referrer. See workflow below:

Current Attribution workflow

Referrer Attribution


Updating the referrer in that case might not be correct, as the visitor initially came directly to the page, but would then be attributed to another channel.

As far as I know the code to update the referrer was initially added to fix some issue, where the referrer was not yet set with the first tracking request, but was sent with a later one. Not updating the referrer in that case, would then mean incorrectly attributing the visit as direct, instead of the correct referrer.

A possible solution could be to only set/update the referrer until the very first page view tracking request of a visit. This would solve the issue, that other tracking requests might have already created a visit without a referrer, as it would then be updated with the page view request.

Changing any behavior in referrer attribution might result in differently tracked data and thus changing numbers. As this might bring trouble, we should not change that outside of a major release.
Also we should consider to do that using a config flag, that will only be activated for new installs automatically, so it won't harm any existing install by default.

@MatomoForumNotifications commented on September 7th 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:


Powered by GitHub Issue Mirror