We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0318a96 commit ef297eeCopy full SHA for ef297ee
packages/core/src/analytics.ts
@@ -491,7 +491,7 @@ export class SegmentClient {
491
492
this.store.userInfo.set({
493
...userInfo,
494
- ...(userId !== undefined ? { userId } : {}),
+ userId: userId ?? userInfo.userId,
495
traits: mergedTraits,
496
});
497
packages/core/src/storage/sovranStorage.ts
@@ -7,6 +7,7 @@ import type {
7
Context,
8
UserInfoState,
9
} from '..';
10
+import { getUUID } from '../uuid';
11
import type { Storage } from './types';
12
13
type Data = {
@@ -24,7 +25,7 @@ const INITIAL_VALUES: Data = {
24
25
context: {},
26
settings: {},
27
userInfo: {
- anonymousId: 'anonymousId',
28
+ anonymousId: getUUID(),
29
userId: undefined,
30
traits: undefined,
31
},
0 commit comments