chore: improve posthog session identificaion

This commit is contained in:
Rotimi Best
2026-05-21 15:08:40 +01:00
parent 9043bede59
commit 9435490c43
5 changed files with 45 additions and 13 deletions
+4 -1
View File
@@ -28,7 +28,10 @@
loadingIndicator.style.display = 'none';
}
setupCloudAnalytics();
const sessionUser = data?.locals?.user;
setupCloudAnalytics(
sessionUser ? { id: sessionUser.id, email: sessionUser.email, name: sessionUser.name } : undefined
);
if (data?.locals?.user) {
user.set({