mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-31 17:19:56 +08:00
chore(editor): add event tracking to drawing tool (#11230)
Closes: [BS-2833](https://linear.app/affine-design/issue/BS-2833/考虑屏蔽或者降低brush-行为的采集密度)
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
AttachmentUploadedEvent,
|
||||
BlockCreationEvent,
|
||||
DocCreatedEvent,
|
||||
EdgelessToolPickedEvent,
|
||||
ElementCreationEvent,
|
||||
ElementLockEvent,
|
||||
LinkedDocCreatedEvent,
|
||||
@@ -26,6 +27,7 @@ export type TelemetryEventMap = OutDatabaseAllEvents &
|
||||
ExpandedAndCollapsed: MindMapCollapseEvent;
|
||||
AttachmentUploadedEvent: AttachmentUploadedEvent;
|
||||
BlockCreated: BlockCreationEvent;
|
||||
EdgelessToolPicked: EdgelessToolPickedEvent;
|
||||
};
|
||||
|
||||
export interface TelemetryService {
|
||||
|
||||
@@ -69,3 +69,11 @@ export interface AttachmentUploadedEvent extends TelemetryEvent {
|
||||
type: string; // file type
|
||||
category: 'success' | 'failure';
|
||||
}
|
||||
|
||||
export interface EdgelessToolPickedEvent extends TelemetryEvent {
|
||||
page: 'whiteboard editor';
|
||||
segment: 'global toolbar';
|
||||
module: 'global toolbar';
|
||||
control: 'drawing';
|
||||
type: 'brush';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user