chore: move analytics to platform (#2960)

This commit is contained in:
Akash K
2023-04-04 02:15:20 +05:30
committed by GitHub
parent defece95fc
commit 37a3b72025
19 changed files with 140 additions and 198 deletions

View File

@@ -6,8 +6,8 @@ import {
} from "vue-router"
import { setupLayouts } from "virtual:generated-layouts"
import generatedRoutes from "virtual:generated-pages"
import { logPageView } from "~/helpers/fb/analytics"
import { readonly, ref } from "vue"
import { platform } from "~/platform"
const routes = setupLayouts(generatedRoutes)
@@ -59,7 +59,7 @@ export default <HoppModule>{
// module to expose a stream of router events that can be independently
// subbed to
router.afterEach((to) => {
logPageView(to.fullPath)
platform.analytics?.logPageView(to.fullPath)
_isLoadingInitialRoute.value = false