@tellyouai/plugin 0.1.3 → 0.1.5
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 +22 -1
- package/dist/package/index.js +9694 -9496
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ it can be used from React, Vue, Svelte, or a plain browser application.
|
|
|
9
9
|
Pin an exact release when application behavior must remain stable:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npm install --save-exact @tellyouai/plugin@0.1.
|
|
12
|
+
npm install --save-exact @tellyouai/plugin@0.1.4
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Initialize the plugin after the page has loaded:
|
|
@@ -86,6 +86,27 @@ Existing script integrations remain supported:
|
|
|
86
86
|
Query-string configuration belongs to the CDN entry. npm consumers pass all
|
|
87
87
|
configuration to `initialize` directly.
|
|
88
88
|
|
|
89
|
+
## User identity
|
|
90
|
+
|
|
91
|
+
Pass the host application's stable user ID to reuse and update the same
|
|
92
|
+
Tellyou contact across visits:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
await initialize({
|
|
96
|
+
entityId: "YOUR_AI_ENTITY_ID",
|
|
97
|
+
user: {
|
|
98
|
+
id: currentUser.id,
|
|
99
|
+
name: currentUser.name,
|
|
100
|
+
email: currentUser.email,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The ID is scoped to the corporate that owns the AI. Email and phone are used
|
|
106
|
+
to match existing contacts, while the supplied profile fields update the
|
|
107
|
+
matched contact. Use `user.entityId` only when the host already has the
|
|
108
|
+
Tellyou entity ID; it takes precedence over `user.id`.
|
|
109
|
+
|
|
89
110
|
## Consent and storage
|
|
90
111
|
|
|
91
112
|
The plugin automatically reads IAB TCF v2, Cookiebot, OneTrust, and Didomi
|