(core) Add welcomeQuestionsSubmitted telemetry event

Summary:
The new event captures responses to the welcome questionnaire.

Responses are also still sent to the special Grist document configured with
the DOC_ID_NEW_USER_INFO variable.

Test Plan: Tested manually.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4034
This commit is contained in:
George Gevoian
2023-09-09 17:01:53 -04:00
parent f659f3655d
commit 76e822eb23
4 changed files with 51 additions and 5 deletions

View File

@@ -862,6 +862,25 @@ export const TelemetryContracts: TelemetryContracts = {
},
},
},
welcomeQuestionsSubmitted: {
description: 'Triggered when the welcome questionnaire is submitted.',
minimumTelemetryLevel: Level.full,
retentionPeriod: 'indefinitely',
metadataContracts: {
useCases: {
description: 'The selected use cases.',
dataType: 'string[]',
},
useOther: {
description: 'The value of the Other use case.',
dataType: 'string',
},
userId: {
description: 'The id of the user that triggered this event.',
dataType: 'number',
},
},
},
};
type TelemetryContracts = Record<TelemetryEvent, TelemetryEventContract>;
@@ -891,6 +910,7 @@ export const TelemetryEvents = StringUnion(
'tutorialProgressChanged',
'tutorialRestarted',
'watchedVideoTour',
'welcomeQuestionsSubmitted',
);
export type TelemetryEvent = typeof TelemetryEvents.type;