-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Hash changes are reported on the wrong URL #3083
Comments
I think I know what's going on. We hook into the You can try this, edit the const handlePush = (state, title, url) => {
if (!url) return;
currentRef = currentUrl;
// currentUrl = parseURL(url.toString());
// change to this
currentUrl = parseURL(location.href);
if (currentUrl !== currentRef) {
setTimeout(track, delayDuration);
}
}; Then run |
Right, so what you'll want to do is this:
This will use the built-in URL API to resolve a potentially relative URL against the current document and then I also looked at the parseURL implementation and using origin is wrong, because links can be one of three types, The following links all resolve to the same page:
Using edit actually it's that very |
…relative URLs like pushState
fix #3083 improve the parseURL function to handle page-relative URLs
Fixed with the above PR |
Describe the Bug
If you have a page that updates the URL's hash value, those URL changes are reported on the top level / rather than the page itself.
For example, https://polypane.app/css-specificity-calculator/ will append e.g.
#selector=header%20h1%23sitetitle%20%3E%20.logo
depending on the value added to the input field on that page.All of these show up as top level links:
Database
PostgreSQL
Relevant log output
Which Umami version are you using? (if relevant)
No response
Which browser are you using? (if relevant)
all
How are you deploying your application? (if relevant)
node on vps
The text was updated successfully, but these errors were encountered: