From 3e2890bd21140afc65c365cdad9f076cd5cd299c Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Tue, 2 Feb 2021 20:57:22 +0530 Subject: [PATCH] fix: track zenmode and grid mode usage (#2900) --- src/actions/actionToggleGridMode.tsx | 2 ++ src/actions/actionToggleZenMode.tsx | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/actions/actionToggleGridMode.tsx b/src/actions/actionToggleGridMode.tsx index e99e3a01..152a9da9 100644 --- a/src/actions/actionToggleGridMode.tsx +++ b/src/actions/actionToggleGridMode.tsx @@ -2,10 +2,12 @@ import { CODES, KEYS } from "../keys"; import { register } from "./register"; import { GRID_SIZE } from "../constants"; import { AppState } from "../types"; +import { trackEvent } from "../analytics"; export const actionToggleGridMode = register({ name: "gridMode", perform(elements, appState) { + trackEvent("view", "mode", "grid"); return { appState: { ...appState, diff --git a/src/actions/actionToggleZenMode.tsx b/src/actions/actionToggleZenMode.tsx index 38da9cde..5ff494ea 100644 --- a/src/actions/actionToggleZenMode.tsx +++ b/src/actions/actionToggleZenMode.tsx @@ -1,9 +1,12 @@ import { CODES, KEYS } from "../keys"; import { register } from "./register"; +import { trackEvent } from "../analytics"; export const actionToggleZenMode = register({ name: "zenMode", perform(elements, appState) { + trackEvent("view", "mode", "zen"); + return { appState: { ...appState,