From ad59c820a242fa040821ba8e12693dd4d2e2531d Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 22 Feb 2021 11:22:43 +0100 Subject: [PATCH] added track of theme changes --- apps/remix-ide/src/app/tabs/theme-module.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index 11c6a68be0..4c45f05d37 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/apps/remix-ide/src/app/tabs/theme-module.js @@ -3,6 +3,7 @@ import { EventEmitter } from 'events' import QueryParams from '../../lib/query-params' import * as packageJson from '../../../../../package.json' import yo from 'yo-yo' +const _paq = window._paq = window._paq || [] const themes = [ { name: 'Dark', quality: 'dark', url: 'assets/css/themes/remix-dark_tvx1s2.css' }, @@ -77,6 +78,7 @@ export class ThemeModule extends Plugin { if (themeName && !Object.keys(this.themes).includes(themeName)) { throw new Error(`Theme ${themeName} doesn't exist`) } + _paq.push(['trackEvent', 'themeModule', 'switchTo', themeName]) const next = themeName || this.active // Name const nextTheme = this.themes[next] // Theme if (!this.forced) this._deps.config.set('settings/theme', next)