chore: add ga for most actions (#4829)

This commit is contained in:
David Luzar 2022-03-28 14:46:40 +02:00 committed by GitHub
parent e940aeb1a3
commit f242721f3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 221 additions and 93 deletions

View file

@ -262,9 +262,7 @@ export const actionLink = register({
commitToHistory: true,
};
},
trackEvent: (action, source) => {
trackEvent("hyperlink", "edit", source);
},
trackEvent: { category: "hyperlink", action: "click" },
keyTest: (event) => event[KEYS.CTRL_OR_CMD] && event.key === KEYS.K,
contextItemLabel: (elements, appState) =>
getContextMenuLabel(elements, appState),

View file

@ -2,11 +2,7 @@ import { duplicateElement } from "./newElement";
import { mutateElement } from "./mutateElement";
import { API } from "../tests/helpers/api";
import { FONT_FAMILY } from "../constants";
const isPrimitive = (val: any) => {
const type = typeof val;
return val == null || (type !== "object" && type !== "function");
};
import { isPrimitive } from "../utils";
const assertCloneObjects = (source: any, clone: any) => {
for (const key in clone) {