It won't remember any hash as the hash won't be visible in the referrer etc but it would work for most other pages.
To make it work for hash it would get likely way more complicated like we would need to persist it through JS, temporarily store it somewhere and redirect accordingly. It fixes the case mentioned in the issue.
Works for me, though I think a simple solution to support the hash would be to store in the session when redirecting to login. Think it's doable @tsteur ?
You'd just need to send the hash through JS which may be a problem or bit difficult...
Of course, wasn't thinking...
I guess it could be sent through a custom query param when logging in, but that might be too much work, and maybe a security risk.
I shall be blunt: not handling the hash makes this a non-fix. The pages that I believe people spend almost all their time on depend fundamentally on the hash, and you’re effectively not on the same page at all if the hash is lost.
The correct fix is to stop using the hash, and put everything in the query string (using history.pushState to manage it all from the client).
@chris-morgan we will maybe in Matomo 4 or at some point stop using the hash but we can't easily do it as it requires changing quite a bit of code through our big codebase and couple plugins.