Get current distinct ID (real user ID if identified, otherwise anonymous ID)
()
| 106 | |
| 107 | /** Get current distinct ID (real user ID if identified, otherwise anonymous ID) */ |
| 108 | function getDistinctId(): string | undefined { |
| 109 | return currentUserId ?? anonymousId |
| 110 | } |
| 111 | |
| 112 | /** Reset analytics state - for testing only */ |
| 113 | export function resetAnalyticsState(deps?: AnalyticsDeps) { |