(core) Add additional telemetry events

Summary: The new events capture usage of forms, widgets, access rules, and onboarding tours and tips.

Test Plan: Manual.

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D4189
This commit is contained in:
George Gevoian
2024-02-13 12:49:00 -05:00
parent 7f9e2817d1
commit b8f32d1784
25 changed files with 483 additions and 55 deletions

View File

@@ -8,6 +8,7 @@ import {aclSelect} from 'app/client/aclui/ACLSelect';
import {ACLUsersPopup} from 'app/client/aclui/ACLUsers';
import {PermissionKey, permissionsWidget} from 'app/client/aclui/PermissionsWidget';
import {GristDoc} from 'app/client/components/GristDoc';
import {logTelemetryEvent} from 'app/client/lib/telemetry';
import {reportError, UserError} from 'app/client/models/errors';
import {TableData} from 'app/client/models/TableData';
import {shadowScroll} from 'app/client/ui/shadowScroll';
@@ -308,6 +309,13 @@ export class AccessRules extends Disposable {
});
}
logTelemetryEvent('changedAccessRules', {
full: {
docIdDigest: this.gristDoc.docId(),
ruleCount: newRules.length,
},
});
// We need to fill in rulePos values. We'll add them in the order the rules are listed (since
// this.getRules() returns them in a suitable order), keeping rulePos unchanged when possible.
let lastGoodRulePos = 0;