mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
More events for layers, align, colors and swap name <=> category (#2442)
This commit is contained in:
parent
0ef60dce2d
commit
668150a667
9 changed files with 96 additions and 43 deletions
|
@ -2,15 +2,17 @@ export const EVENT_ACTION = "action";
|
|||
export const EVENT_EXIT = "exit";
|
||||
export const EVENT_CHANGE = "change";
|
||||
export const EVENT_SHAPE = "shape";
|
||||
export const EVENT_LAYER = "layer";
|
||||
export const EVENT_ALIGN = "align";
|
||||
|
||||
export const trackEvent = window.gtag
|
||||
? (name: string, category: string, label?: string, value?: number) => {
|
||||
? (category: string, name: string, label?: string, value?: number) => {
|
||||
window.gtag("event", name, {
|
||||
event_category: category,
|
||||
event_label: label,
|
||||
value,
|
||||
});
|
||||
}
|
||||
: (name: string, category: string, label?: string, value?: number) => {
|
||||
console.info("Track Event", name, category, label, value);
|
||||
: (category: string, name: string, label?: string, value?: number) => {
|
||||
console.info("Track Event", category, name, label, value);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue