fix(editor): update embed iframe block event tracker (#11736)

Close [BS-3151](https://linear.app/affine-design/issue/BS-3151/埋一下-reload-link-成功失败)
This commit is contained in:
donteatfriedrice
2025-04-16 09:53:38 +00:00
parent 16f7be7f0b
commit 022e5f2c93
8 changed files with 31 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import type { TelemetryEvent } from './types.js';
import type { LinkEvent } from './types.js';
export type LinkEventType =
| 'CopiedLink'
@@ -16,4 +16,4 @@ export type LinkEventType =
| 'EditLink'
| 'ReloadLink';
export type LinkToolbarEvents = Record<LinkEventType, TelemetryEvent>;
export type LinkToolbarEvents = Record<LinkEventType, LinkEvent>;

View File

@@ -13,6 +13,7 @@ import type {
ElementLockEvent,
ElementUpdatedEvent,
LinkedDocCreatedEvent,
LinkEvent,
MindMapCollapseEvent,
TelemetryEvent,
} from './types.js';
@@ -32,7 +33,7 @@ export type TelemetryEventMap = OutDatabaseAllEvents &
AttachmentUploadedEvent: AttachmentUploadedEvent;
BlockCreated: BlockCreationEvent;
EdgelessToolPicked: EdgelessToolPickedEvent;
CreateEmbedBlock: TelemetryEvent;
CreateEmbedBlock: LinkEvent;
};
export interface TelemetryService {

View File

@@ -86,3 +86,7 @@ export interface ElementUpdatedEvent extends TelemetryEvent {
control: string;
type?: string;
}
export interface LinkEvent extends TelemetryEvent {
result?: 'success' | 'failure';
}