(screenName: string)
| 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 |