(core) Add new telemetry events

Summary: Adds a handful of new telemetry events, and makes a few tweaks to allow for better organization of telemetry.

Test Plan: Manual.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4100
This commit is contained in:
George Gevoian
2023-11-01 09:54:19 -04:00
parent 51f7402297
commit 7a85aaa7a1
19 changed files with 523 additions and 129 deletions

View File

@@ -27,6 +27,7 @@ import {Document, NEW_DOCUMENT_CODE, Organization, UserAPI, Workspace} from 'app
import {Holder, Observable, subscribe} from 'grainjs';
import {Computed, Disposable, dom, DomArg, DomElementArg} from 'grainjs';
import {makeT} from 'app/client/lib/localization';
import {logTelemetryEvent} from 'app/client/lib/telemetry';
// tslint:disable:no-console
@@ -365,6 +366,14 @@ It also disables formulas. [{{error}}]", {error: err.message})
await this.updateUrlNoReload(doc.urlId, doc.openMode);
}
if (doc.isTemplate) {
logTelemetryEvent('openedTemplate', {
full: {
templateId: parseUrlId(doc.urlId || doc.id).trunkId,
},
});
}
this.currentDoc.set(doc);
}