feat: add page view to telemetry

This commit is contained in:
Andrew Bastin
2021-07-08 23:39:07 -04:00
parent cad7ecf760
commit 36745d79db
2 changed files with 16 additions and 1 deletions

View File

@@ -91,3 +91,11 @@ export function logHoppRequestRunToAnalytics(ev: HoppRequestEvent) {
analytics.logEvent("hopp-request", ev)
}
}
export function logPageView(pagePath: string) {
if (settingsStore.value.TELEMETRY_ENABLED) {
analytics.logEvent("page_view", {
page_path: pagePath,
})
}
}