diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java index 53ffba9bdc..8e83b2818d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/AnalyticsService.java @@ -65,13 +65,13 @@ public class AnalyticsService { return userMono .map(user -> { - // In case the user is anonymous, return as is without raising the event. - if (user.isAnonymous()) { + // In case the user is anonymous, don't raise an event, unless it's a signup event. + if (user.isAnonymous() && !(object instanceof User && event == AnalyticsEvents.CREATE)) { return object; } HashMap analyticsProperties = new HashMap<>(); - analyticsProperties.put("id", object.getId()); + analyticsProperties.put("id", object instanceof User ? ((User) object).getUsername() : object.getId()); analyticsProperties.put("object", object.toString()); analytics.enqueue(