MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / trackStudioEvent

Function trackStudioEvent

packages/studio/src/utils/studioTelemetry.ts:51–63  ·  view source on GitHub ↗
(event: string, properties: EventProperties = {})

Source from the content-addressed store, hash-verified

49declare const __STUDIO_VERSION__: string;
50
51export function trackStudioEvent(event: string, properties: EventProperties = {}): void {
52 if (!isEnabled()) return;
53
54 queue.push({
55 event: `studio:${event}`,
56 properties: { ...getSessionProperties(), ...properties },
57 timestamp: new Date().toISOString(),
58 });
59
60 if (!flushTimer) {
61 flushTimer = setInterval(flushEvents, FLUSH_INTERVAL_MS);
62 }
63}
64
65async function flushEvents(): Promise<void> {
66 if (queue.length === 0) return;

Callers 15

main.tsxFile · 0.90
ViewModeToggleFunction · 0.90
StudioHeaderFunction · 0.90
componentDidCatchMethod · 0.90
LeftSidebar.tsxFile · 0.90
FormatExportButtonFunction · 0.90
CompositionBreadcrumbFunction · 0.90
sdkCutoverPersistFunction · 0.90
sdkTimingPersistFunction · 0.90
runFunction · 0.90
sdkDeletePersistFunction · 0.90
runResolverShadowFunction · 0.90

Calls 2

isEnabledFunction · 0.85
getSessionPropertiesFunction · 0.85

Tested by

no test coverage detected