From 7ec59c3c772dbb83a29cd05cc6d047ebfb2b65d2 Mon Sep 17 00:00:00 2001 From: Vishal Sharma Date: Fri, 20 Jun 2025 18:51:59 +0530 Subject: [PATCH] chore: move posthog and appcues ids to userId and orgId (#8316) --- frontend/src/AppRoutes/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx index b83079c89dff..44c29f08d2fb 100644 --- a/frontend/src/AppRoutes/index.tsx +++ b/frontend/src/AppRoutes/index.tsx @@ -71,7 +71,7 @@ function App(): JSX.Element { const orgName = org && Array.isArray(org) && org.length > 0 ? org[0].displayName : ''; - const { displayName, email, role } = user; + const { displayName, email, role, id, orgId } = user; const domain = extractDomain(email); const hostNameParts = hostname.split('.'); @@ -105,7 +105,7 @@ function App(): JSX.Element { logEvent('Domain Identified', groupTraits, 'group'); } if (window && window.Appcues) { - window.Appcues.identify(email, { + window.Appcues.identify(id, { name: displayName, tenant_id: hostNameParts[0], @@ -131,7 +131,7 @@ function App(): JSX.Element { isPaidUser: !!trialInfo?.trialConvertedToSubscription, }); - posthog?.identify(email, { + posthog?.identify(id, { email, name: displayName, orgName, @@ -143,7 +143,7 @@ function App(): JSX.Element { isPaidUser: !!trialInfo?.trialConvertedToSubscription, }); - posthog?.group('company', domain, { + posthog?.group('company', orgId, { name: orgName, tenant_id: hostNameParts[0], data_region: hostNameParts[1],