-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
currentRef is always resolves to referrer #3016
Comments
Its just a condition to prevent the hostname of your website from being recorded as a referrer. Taking a quick look at the docs for document.referrer, I'm guessing this note below can potentially be an issue? But I think your correct, since once your on the website,
It is working since umami.is doesn't refer to itself, but it will probably work with the below?
|
Right, That means when the user browse through the website the previous url will be recorded as the referrer as there is no hostname check. If you want to prevent sending referrer for the same hostname there should be some logic to extract hostname from the |
Just to clarify, I'm talking about the case when a user navigates through full page refresh (like |
Describe the Bug
I was reviewing the tracker source code and found a suspicious check on the following line:
The hostname in here is
location.hostname
, which is just the host part of url (without port). And the referrer isdocument.referrer
which is the full url. I see it as a potential bug as i always resolves to true.Database
Umami Cloud
Relevant log output
No response
Which Umami version are you using? (if relevant)
No response
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: