cap-hydra-web-sdk 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -12
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -348,6 +348,19 @@ WebSDK.identify({
|
|
|
348
348
|
|
|
349
349
|
**`Identifier.type` values:** `'email'`, `'mobile'`, `'externalId'`
|
|
350
350
|
|
|
351
|
+
**`IdentifyTraits` fields:**
|
|
352
|
+
|
|
353
|
+
| Field | Type | Description |
|
|
354
|
+
| ----------- | ------------------------- | ----------------------------------------------- |
|
|
355
|
+
| `firstName` | `string` | First name |
|
|
356
|
+
| `lastName` | `string` | Last name |
|
|
357
|
+
| `gender` | `string` | Gender |
|
|
358
|
+
| `birthday` | `string` | Birthday |
|
|
359
|
+
| `city` | `string` | City |
|
|
360
|
+
| `country` | `string` | Country |
|
|
361
|
+
| `timezone` | `string` | Timezone |
|
|
362
|
+
| `custom` | `Record<string, unknown>` | Additional custom attributes merged into events |
|
|
363
|
+
|
|
351
364
|
---
|
|
352
365
|
|
|
353
366
|
### 5. `getUser()`
|
|
@@ -365,18 +378,18 @@ console.log(userInfo.isFirstSession); // true
|
|
|
365
378
|
|
|
366
379
|
**Returns:** `UserInfo`
|
|
367
380
|
|
|
368
|
-
| Field
|
|
369
|
-
|
|
|
370
|
-
| `visitorId`
|
|
371
|
-
| `userId`
|
|
372
|
-
| `sessionId`
|
|
373
|
-
| `isIdentified`
|
|
374
|
-
| `isAnonymous`
|
|
375
|
-
| `profileTier`
|
|
376
|
-
| `attributes`
|
|
377
|
-
| `sessionNumber`
|
|
378
|
-
| `isFirstSession`
|
|
379
|
-
| `isReturningVisitor
|
|
381
|
+
| Field | Type | Description |
|
|
382
|
+
| -------------------- | --------------------------------- | ---------------------------------------- |
|
|
383
|
+
| `visitorId` | `string` | The anonymous visitor ID |
|
|
384
|
+
| `userId` | `string \| null` | Always `null` for anonymous users |
|
|
385
|
+
| `sessionId` | `string` | The current session ID |
|
|
386
|
+
| `isIdentified` | `boolean` | Always `false` for anonymous users |
|
|
387
|
+
| `isAnonymous` | `boolean` | Always `true` for anonymous users |
|
|
388
|
+
| `profileTier` | `'anonymous' \| 'known'` | Always `'anonymous'` for anonymous users |
|
|
389
|
+
| `attributes` | `Record<string, unknown> \| null` | Always `null` for anonymous users |
|
|
390
|
+
| `sessionNumber` | `number` | Number of sessions for this visitor |
|
|
391
|
+
| `isFirstSession` | `boolean` | `true` when `sessionNumber === 1` |
|
|
392
|
+
| `isReturningVisitor` | `boolean` | `true` when `sessionNumber > 1` |
|
|
380
393
|
|
|
381
394
|
**Throws:** `Error` if the user is identified (i.e., after `identify()` has been called).
|
|
382
395
|
|