I am working on a project that uses Vue 2 and Vue Router 3 with hash-based routing. While integrating Umami for analytics, I noticed that all collected page paths are recorded as /. This issue prevents accurate tracking of user navigation within the application.
Umami should correctly record the full hash-based paths (e.g., #/home, #/about) instead of just /.
Actual Behavior
All recorded paths are shown as /, regardless of the actual route.
Possible Solution
I noticed that in the parseURL function within the Umami script, it only retrieves URL.pathname. This results in the path always being recorded as / when using hash routing. Perhaps URL.hash could be used to capture the full path when using hash routing?
Describe the feature or enhancement
Description:
I am working on a project that uses Vue 2 and Vue Router 3 with hash-based routing. While integrating
Umami
for analytics, I noticed that all collected page paths are recorded as/
. This issue prevents accurate tracking of user navigation within the application.Minimal Example
demo
Expected Behavior
Umami should correctly record the full hash-based paths (e.g.,
#/home
,#/about
) instead of just/
.Actual Behavior
All recorded paths are shown as
/
, regardless of the actual route.Possible Solution
I noticed that in the
parseURL
function within the Umami script, it only retrievesURL.pathname
. This results in the path always being recorded as/
when using hash routing. PerhapsURL.hash
could be used to capture the full path when using hash routing?