Add analytic events

This commit is contained in:
BorysLevytskyi
2021-01-16 15:46:36 +02:00
parent d745703274
commit ff55171cff
3 changed files with 39 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import uuid from 'uuid';
import { sendAnalyticsEvent } from './analytics';
import AppState from './AppState';
import { CmdShell, CommandInput } from './cmd';
import AboutResultView from './components/AboutResultView';
@@ -30,6 +31,13 @@ const shellModule = {
appState.addCommandResult(c.input, <TextResultView text={`Debug Mode: ${appState.debugMode}`}/>);
});
cmd.command("track", (c:CommandInput) => {
sendAnalyticsEvent({
eventCategory: 'General',
eventAction: 'AnalyticsTest'
});
});
if(appState.env !== 'prod') {
// Default command for development purposes