mirror of https://github.com/nocodb/nocodb
Raju Udava
1 year ago
committed by
GitHub
8 changed files with 54 additions and 4 deletions
@ -0,0 +1,16 @@
|
||||
import { init, push } from 'nc-analytics'; |
||||
|
||||
init(); |
||||
|
||||
export function onRouteDidUpdate({ location, previousLocation }) { |
||||
// Don't execute if we are still on the same page; the lifecycle may be fired
|
||||
// because the hash changes (e.g. when navigating between headings)
|
||||
if (location.pathname !== previousLocation?.pathname || location.hash !== previousLocation?.hash) { |
||||
push({ |
||||
event: '$pageview', |
||||
$current_url: location.pathname, |
||||
hash: location.hash, |
||||
}); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue