From 6711f980d8b0a263a415242c8fcece7002993735 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Sat, 19 Jun 2021 17:24:51 +0100 Subject: [PATCH] Add gtag to history --- state/history.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/state/history.ts b/state/history.ts index 1fd7fe6b5..041364fc0 100644 --- a/state/history.ts +++ b/state/history.ts @@ -1,4 +1,5 @@ import { Data } from 'types' +import * as gtag from 'utils/gtag' import { BaseCommand } from './commands/command' import storage from './storage' @@ -11,6 +12,13 @@ class History { private _enabled = true execute = (data: T, command: BaseCommand) => { + gtag.event({ + action: command.name, + category: command.category, + label: '', + value: 0, + }) + command.redo(data, true) if (this.disabled) return