diff --git a/app/client/src/components/editorComponents/Debugger/ContextualMenu.tsx b/app/client/src/components/editorComponents/Debugger/ContextualMenu.tsx index 89112646a1..1705de3311 100644 --- a/app/client/src/components/editorComponents/Debugger/ContextualMenu.tsx +++ b/app/client/src/components/editorComponents/Debugger/ContextualMenu.tsx @@ -156,6 +156,9 @@ const searchAction: Record< icon: "duplicate", text: createMessage(DEBUGGER_COPY_MESSAGE), onSelect: (error: Message) => { + AnalyticsUtil.logEvent("DEBUGGER_CONTEXT_MENU_CLICK", { + menuItem: CONTEXT_MENU_ACTIONS.COPY, + }); copy(error.message); }, }, @@ -163,6 +166,9 @@ const searchAction: Record< icon: "share-2", text: createMessage(DEBUGGER_SEARCH_GOOGLE), onSelect: (error: Message) => { + AnalyticsUtil.logEvent("DEBUGGER_CONTEXT_MENU_CLICK", { + menuItem: CONTEXT_MENU_ACTIONS.GOOGLE, + }); window.open("http://google.com/search?q=" + error.message); }, }, @@ -170,6 +176,9 @@ const searchAction: Record< icon: "book-line", text: createMessage(DEBUGGER_OPEN_DOCUMENTATION), onSelect: (error: Message, dispatch: Dispatch) => { + AnalyticsUtil.logEvent("DEBUGGER_CONTEXT_MENU_CLICK", { + menuItem: CONTEXT_MENU_ACTIONS.DOCS, + }); // Search through the omnibar AnalyticsUtil.logEvent("OPEN_OMNIBAR", { source: "DEBUGGER", @@ -186,6 +195,9 @@ const searchAction: Record< icon: "support", text: createMessage(DEBUGGER_APPSMITH_SUPPORT), onSelect: (error: Message) => { + AnalyticsUtil.logEvent("DEBUGGER_CONTEXT_MENU_CLICK", { + menuItem: CONTEXT_MENU_ACTIONS.INTERCOM, + }); // Search through the omnibar if (intercomAppID && window.Intercom) { window.Intercom( @@ -199,6 +211,9 @@ const searchAction: Record< icon: "play", text: createMessage(DEBUGGER_SEARCH_SNIPPET), onSelect: (error: Message, dispatch: Dispatch, entity) => { + AnalyticsUtil.logEvent("DEBUGGER_CONTEXT_MENU_CLICK", { + menuItem: CONTEXT_MENU_ACTIONS.SNIPPET, + }); /// Search through the omnibar AnalyticsUtil.logEvent("OPEN_OMNIBAR", { source: "DEBUGGER", diff --git a/app/client/src/utils/AnalyticsUtil.tsx b/app/client/src/utils/AnalyticsUtil.tsx index a79eca6377..8b59695d7f 100644 --- a/app/client/src/utils/AnalyticsUtil.tsx +++ b/app/client/src/utils/AnalyticsUtil.tsx @@ -131,6 +131,7 @@ export type EventName = | "DEBUGGER_RESOLVED_ERROR" | "DEBUGGER_NEW_ERROR_MESSAGE" | "DEBUGGER_RESOLVED_ERROR_MESSAGE" + | "DEBUGGER_CONTEXT_MENU_CLICK" | "ADD_MOCK_DATASOURCE_CLICK" | "CREATE_DATA_SOURCE_AUTH_API_CLICK" | "GEN_CRUD_PAGE_CREATE_NEW_DATASOURCE"