diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx index 71289a6a96..ee51e3ac89 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx @@ -20,6 +20,7 @@ import styled from "styled-components"; import { ControlIcons } from "icons/ControlIcons"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; +import AnalyticsUtil from "utils/AnalyticsUtil"; const CloseIcon = ControlIcons.CLOSE_CONTROL; @@ -64,6 +65,15 @@ export function EntityProperties() { return () => document.removeEventListener("click", handleOutsideClick); }, [show]); + useEffect(() => { + if (entityId) { + AnalyticsUtil.logEvent("SHOW_BINDINGS_TRIGGERED", { + entityName, + entityType, + }); + } + }, [entityId]); + const actionEntity = useSelector((state: AppState) => state.entities.actions.find((action) => action.config.id === entityId), ); @@ -132,6 +142,7 @@ export function EntityProperties() { propertyName: actionProperty, entityName: jsCollection.config.name, value: value, + entityType, }; }, ); @@ -166,6 +177,7 @@ export function EntityProperties() { propertyName: actionProperty, entityName: entityName, value, + entityType, }; }); } @@ -192,6 +204,7 @@ export function EntityProperties() { propertyName: widgetProperty, entityName: entity.widgetName, value: entity[widgetProperty], + entityType, }; }); break; diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx index e6625ea5d5..0595876aa1 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperty.tsx @@ -15,6 +15,7 @@ import { COPY_ELEMENT, createMessage } from "@appsmith/constants/messages"; import { TOOLTIP_HOVER_ON_DELAY } from "constants/AppConstants"; import CollapseToggle from "./CollapseToggle"; import { ReactComponent as CopyIcon } from "assets/icons/menu/copy-snippet.svg"; +import AnalyticsUtil from "utils/AnalyticsUtil"; const Wrapper = styled.div<{ step: number }>` &&&& { @@ -140,6 +141,10 @@ export const EntityProperty = memo((props: any) => { const isString = typeof props.value === "string"; const copyBindingToClipboard = () => { + AnalyticsUtil.logEvent("BINDING_COPIED", { + entityType: props.entityType, + codeText, + }); write(codeText); }; diff --git a/app/client/src/utils/AnalyticsUtil.tsx b/app/client/src/utils/AnalyticsUtil.tsx index 1bc15995ce..7d3fa89f99 100644 --- a/app/client/src/utils/AnalyticsUtil.tsx +++ b/app/client/src/utils/AnalyticsUtil.tsx @@ -261,7 +261,9 @@ export type EventName = | "PRETTIFY_CODE_KEYBOARD_SHORTCUT" | "JS_OBJECT_CREATED" | "JS_OBJECT_FUNCTION_ADDED" - | "JS_OBJECT_FUNCTION_RUN"; + | "JS_OBJECT_FUNCTION_RUN" + | "SHOW_BINDINGS_TRIGGERED" + | "BINDING_COPIED"; function getApplicationId(location: Location) { const pathSplit = location.pathname.split("/");