chore: add ga for most actions (#4829)
This commit is contained in:
src
actions
actionAddToLibrary.tsactionAlign.tsxactionBoundText.tsxactionCanvas.tsxactionClipboard.tsxactionDeleteSelected.tsxactionDistribute.tsxactionDuplicateSelection.tsxactionExport.tsxactionFinalize.tsxactionFlip.tsactionGroup.tsxactionHistory.tsxactionMenu.tsxactionNavigate.tsxactionProperties.tsxactionSelectAll.tsactionStyles.tsactionToggleGridMode.tsxactionToggleStats.tsxactionToggleViewMode.tsxactionToggleZenMode.tsxactionZindex.tsxmanager.tsxtypes.ts
analytics.tscomponents
Actions.tsxApp.tsxContextMenu.tsxImageExportDialog.tsxJSONExportDialog.tsxLayerUI.tsxLibraryMenu.tsx
element
excalidraw-app
types.tsutils.ts@ -11,6 +11,7 @@ import {
|
||||
import { getSceneVersion } from "../../packages/excalidraw/index";
|
||||
import { Collaborator, Gesture } from "../../types";
|
||||
import {
|
||||
getFrame,
|
||||
preventUnload,
|
||||
resolvablePromise,
|
||||
withBatchedUpdates,
|
||||
@ -239,7 +240,7 @@ class CollabWrapper extends PureComponent<Props, CollabState> {
|
||||
};
|
||||
|
||||
openPortal = async () => {
|
||||
trackEvent("share", "room creation");
|
||||
trackEvent("share", "room creation", `ui (${getFrame()})`);
|
||||
return this.initializeSocketClient(null);
|
||||
};
|
||||
|
||||
|
@ -13,6 +13,8 @@ import { isInitializedImageElement } from "../../element/typeChecks";
|
||||
import { FILE_UPLOAD_MAX_BYTES } from "../app_constants";
|
||||
import { encodeFilesForUpload } from "../data/FileManager";
|
||||
import { MIME_TYPES } from "../../constants";
|
||||
import { trackEvent } from "../../analytics";
|
||||
import { getFrame } from "../../utils";
|
||||
|
||||
const exportToExcalidrawPlus = async (
|
||||
elements: readonly NonDeletedExcalidrawElement[],
|
||||
@ -92,6 +94,7 @@ export const ExportToExcalidrawPlus: React.FC<{
|
||||
showAriaLabel={true}
|
||||
onClick={async () => {
|
||||
try {
|
||||
trackEvent("export", "eplus", `ui (${getFrame()})`);
|
||||
await exportToExcalidrawPlus(elements, appState, files);
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
|
@ -34,6 +34,7 @@ import {
|
||||
import {
|
||||
debounce,
|
||||
getVersion,
|
||||
getFrame,
|
||||
isTestEnv,
|
||||
preventUnload,
|
||||
ResolvablePromise,
|
||||
@ -302,6 +303,7 @@ const ExcalidrawWrapper = () => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
trackEvent("load", "frame", getFrame());
|
||||
// Delayed so that the app has a time to load the latest SW
|
||||
setTimeout(() => {
|
||||
trackEvent("load", "version", getVersion());
|
||||
|
Reference in New Issue
Block a user