From a1702d9b2ec584d3c19a0f916e573a7d62b13bac Mon Sep 17 00:00:00 2001 From: Vishnu Gp Date: Thu, 8 Dec 2022 21:05:34 +0530 Subject: [PATCH] fix: Corrected action execution analytics event (#18783) --- .../appsmith/server/services/ce/AnalyticsServiceCEImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AnalyticsServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AnalyticsServiceCEImpl.java index 40fddfa125..24b9f48924 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AnalyticsServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AnalyticsServiceCEImpl.java @@ -4,6 +4,7 @@ import com.appsmith.external.constants.AnalyticsEvents; import com.appsmith.external.models.BaseDomain; import com.appsmith.server.configurations.CommonConfig; import com.appsmith.server.constants.FieldName; +import com.appsmith.server.domains.NewAction; import com.appsmith.server.domains.NewPage; import com.appsmith.server.domains.User; import com.appsmith.server.domains.UserData; @@ -197,10 +198,11 @@ public class AnalyticsServiceCEImpl implements AnalyticsServiceCE { return userMono .map(user -> { - // In case the user is anonymous, don't raise an event, unless it's a signup, logout or page view event. + // In case the user is anonymous, don't raise an event, unless it's a signup, logout, page view or action execution event. boolean isEventUserSignUpOrLogout = object instanceof User && (event == AnalyticsEvents.CREATE || event == AnalyticsEvents.LOGOUT); boolean isEventPageView = object instanceof NewPage && event == AnalyticsEvents.VIEW; - boolean isAvoidLoggingEvent = user.isAnonymous() && !(isEventUserSignUpOrLogout || isEventPageView); + boolean isEventActionExecution = object instanceof NewAction && event == AnalyticsEvents.EXECUTE_ACTION; + boolean isAvoidLoggingEvent = user.isAnonymous() && !(isEventUserSignUpOrLogout || isEventPageView || isEventActionExecution); if (isAvoidLoggingEvent) { return object; }