When we open the site(site A) and click a link leading to another site B.
Site B will notice that the visitor has no active single-sign-on session and redirect the visitor to the login page, which will redirect you back to site B.
The referrer is now the login link of the Site B instead of the original site referring (site A).
Is this the way it works or do we need to make any changes? Can you please help.
Can you please advise if we can use the below code to resolve the issue?
Matomo uses the referrer from
document.referrer. If the browser looses the original referrer due to a redirect there is nothing Matomo can do about this.
If you have some other way to know the previous URL (e.g. some URL parameter), you can overwrite the referrerURL in the tracking code.