More events for layers, align, colors and swap name <=> category (#2442)

This commit is contained in:
Lipis 2020-12-03 15:10:04 +02:00 committed by GitHub
parent 0ef60dce2d
commit 668150a667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 96 additions and 43 deletions

View file

@ -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);
};