chore: Add analytic events for show bindings pane (#17174)
This commit is contained in:
parent
ce1f42f786
commit
f56e9a2aba
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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("/");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user