(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

@@ -27,9 +27,8 @@ export function showWelcomeQuestions(userPrefsObs: Observable<UserPrefs>) {
const showQuestions = getUserPrefObs(userPrefsObs, 'showNewUserQuestions');
async function onConfirm() {
const selected = choices.filter((c, i) => selection[i].get()).map(c => c.textKey);
const use_cases = ['L', ...selected]; // Format to populate a ChoiceList column
const use_other = selected.includes("Other") ? otherText.get() : '';
const use_cases = choices.filter((c, i) => selection[i].get()).map(c => c.textKey);
const use_other = use_cases.includes("Other") ? otherText.get() : '';
const submitUrl = new URL(window.location.href);
submitUrl.pathname = '/welcome/info';