diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 5ca06e6ca..7f07de46f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -184,13 +184,16 @@ provide(refreshKey, getDbData); onMounted(async () => { const usePosthog = inject(usePosthogKey); - const id = await onPageLoad(); - - if (usePosthog && isAuthenticated.value) { - const profile = useUserStore(); - posthog.identify(profile.data.uniqueHash); - } else if (usePosthog && id) { - posthog.identify(id); + + if (usePosthog) { + const id = await onPageLoad(); + + if (isAuthenticated.value) { + const profile = useUserStore(); + posthog.identify(profile.data.uniqueHash); + } else if (id) { + posthog.identify(id); + } } });