From 44795fb6162fbfc01bef2eb52150ee87e11ee3ae Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Fri, 20 Sep 2024 13:38:23 -0700 Subject: [PATCH] log history --- src/editor/lib/history.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/editor/lib/history.js b/src/editor/lib/history.js index 6b40f285..8a186072 100644 --- a/src/editor/lib/history.js +++ b/src/editor/lib/history.js @@ -1,4 +1,5 @@ import Events from './Events'; +import posthog from 'posthog-js'; export class History { constructor(editor) { @@ -39,6 +40,10 @@ export class History { } cmd.name = optionalName !== undefined ? optionalName : cmd.name; + posthog.capture('execute_command', { + name: cmd.name + }); + cmd.execute(); this.lastCmdTime = Date.now();