From 56e29d22f56303370e47617db64c1110dfc6579c Mon Sep 17 00:00:00 2001 From: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com> Date: Mon, 26 Jul 2021 16:29:15 +0530 Subject: [PATCH] Add new nav related analytics (#6125) Analytics events for the following have been added - Create new datasource CTA on the property pane - Run button at the response tab for actions - Click on associated entity dropdown from the property pane - Select an associated entity from the associated entity dropdown at the property pane --- .../editorComponents/ApiResponseView.tsx | 9 +++++++- .../Editor/PropertyPane/ConnectDataCTA.tsx | 23 +++++++++++-------- .../PropertyPane/PropertyPaneConnections.tsx | 6 +++++ .../Editor/QueryEditor/EditorJSONtoForm.tsx | 10 +++++++- app/client/src/utils/AnalyticsUtil.tsx | 6 ++++- 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/app/client/src/components/editorComponents/ApiResponseView.tsx b/app/client/src/components/editorComponents/ApiResponseView.tsx index 863bb7385f..3980f9cbb4 100644 --- a/app/client/src/components/editorComponents/ApiResponseView.tsx +++ b/app/client/src/components/editorComponents/ApiResponseView.tsx @@ -212,6 +212,13 @@ function ApiResponseView(props: Props) { setSelectedIndex(1); }, []); + const onRunClick = () => { + props.onRunClick(); + AnalyticsUtil.logEvent("RESPONSE_TAB_RUN_ACTION_CLICK", { + source: "API_PANE", + }); + }; + const initialIndex = useSelector(getActionTabsInitialIndex); const [selectedIndex, setSelectedIndex] = useState(initialIndex); const messages = response?.messages; @@ -250,7 +257,7 @@ function ApiResponseView(props: Props) { {EMPTY_RESPONSE_FIRST_HALF()} { + history.push( + INTEGRATION_EDITOR_URL( + applicationId, + pageId, + INTEGRATION_TABS.NEW, + INTEGRATION_EDITOR_MODES.MOCK, + ), + ); + AnalyticsUtil.logEvent("CONNECT_DATA_CLICK"); + }; + return ( Data Required