|
|
@@ -1,4 +1,5 @@
|
|
1
|
1
|
import { Data } from 'types'
|
|
|
2
|
+import * as gtag from 'utils/gtag'
|
|
2
|
3
|
import { BaseCommand } from './commands/command'
|
|
3
|
4
|
import storage from './storage'
|
|
4
|
5
|
|
|
|
@@ -11,6 +12,13 @@ class History<T extends Data> {
|
|
11
|
12
|
private _enabled = true
|
|
12
|
13
|
|
|
13
|
14
|
execute = (data: T, command: BaseCommand<T>) => {
|
|
|
15
|
+ gtag.event({
|
|
|
16
|
+ action: command.name,
|
|
|
17
|
+ category: command.category,
|
|
|
18
|
+ label: '',
|
|
|
19
|
+ value: 0,
|
|
|
20
|
+ })
|
|
|
21
|
+
|
|
14
|
22
|
command.redo(data, true)
|
|
15
|
23
|
|
|
16
|
24
|
if (this.disabled) return
|