Skip to content

Commit

Permalink
fix: Bug where identifyUser not called in cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Nov 12, 2024
1 parent b24b66f commit 94bc989
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/client/src/utils/AppsmithUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,23 @@ export const initializeAnalyticsAndTrackers = async (currentUser: User) => {
if (appsmithConfigs.segment.enabled && !(window as any).analytics) {
if (appsmithConfigs.segment.apiKey) {
// This value is only enabled for Appsmith's cloud hosted version. It is not set in self-hosted environments
return AnalyticsUtil.initializeSegment(appsmithConfigs.segment.apiKey);
await AnalyticsUtil.initializeSegment(appsmithConfigs.segment.apiKey);
} else if (appsmithConfigs.segment.ceKey) {
// This value is set in self-hosted environments. But if the analytics are disabled, it's never used.
return AnalyticsUtil.initializeSegment(appsmithConfigs.segment.ceKey);
await AnalyticsUtil.initializeSegment(appsmithConfigs.segment.ceKey);
}
}

if (
!currentUser.isAnonymous &&
currentUser.username !== ANONYMOUS_USERNAME
) {
await AnalyticsUtil.identifyUser(currentUser);
}
} catch (e) {
Sentry.captureException(e);
log.error(e);
}

if (!currentUser.isAnonymous && currentUser.username !== ANONYMOUS_USERNAME) {
await AnalyticsUtil.identifyUser(currentUser);
}
};

export const mapToPropList = (map: Record<string, string>): Property[] => {
Expand Down

0 comments on commit 94bc989

Please sign in to comment.