MCPcopy Create free account
hub / github.com/winfunc/opcode / setScreen

Method setScreen

src/lib/analytics/index.ts:129–138  ·  view source on GitHub ↗
(screenName: string)

Source from the content-addressed store, hash-verified

127 }
128
129 setScreen(screenName: string): void {
130 this.currentScreen = screenName;
131
132 // Track screen view in PostHog
133 if (typeof posthog !== 'undefined' && typeof posthog.capture === 'function') {
134 posthog.capture('$screen', {
135 $screen_name: screenName,
136 });
137 }
138 }
139
140 track(eventName: EventName | string, properties?: Record<string, any>): void {
141 // Check if analytics is enabled

Callers 1

useScreenTrackingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected