Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve telemetry #4093

Merged
merged 9 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/organisms/NewProject/NewProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const NewProject: React.FC = () => {
'Not sure where to start? Explore a sample project containing everything you need to get started with just one click.',
itemAction: () => {
dispatch(openGitCloneModal({fromSampleProject: true}));
trackEvent('app_start/create_project', {from: 'sample'});
},
},
{
Expand Down Expand Up @@ -105,6 +106,7 @@ const NewProject: React.FC = () => {
itemDescription: 'Create a new project from a Helm Chart in a Helm repository, and save it locally.',
itemAction: () => {
dispatch(openHelmRepoModal());
trackEvent('app_start/create_project', {from: 'helm'});
},
},
];
Expand Down
2 changes: 2 additions & 0 deletions src/redux/thunks/project/createProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {createProject} from '@redux/appConfig';
import {isFolderGitRepo} from '@redux/git/git.ipc';

import {Project} from '@shared/models/config';
import {trackEvent} from '@shared/utils/telemetry';

import {setOpenProject} from './openProject';

Expand All @@ -18,4 +19,5 @@ export const setCreateProject = createAsyncThunk('config/setCreateProject', asyn

thunkAPI.dispatch(createProject({...project, isGitRepo}));
thunkAPI.dispatch(setOpenProject(project.rootFolder));
trackEvent('app_start/create_project', {from: 'folder'});
});
5 changes: 4 additions & 1 deletion src/shared/models/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export type EventMap = {
numberOfValuesFiles: number;
executionTime: number;
};
'app_start/create_project': {from: 'scratch' | 'git' | 'template' | 'folder'; templateID?: string};
'app_start/create_project': {
from: 'sample' | 'scratch' | 'git' | 'template' | 'folder' | 'helm';
templateID?: string;
};
'app_start/select_page': {page: string};
'app_start/select_project': undefined;
'project_list/open_project': undefined;
Expand Down
Loading