You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also pass the identifiers in the `plugSDK.init` option without generating the session token.
127
127
128
128
<Calloutintent="note">
129
-
The frontend method, by its nature, is not secure as the data is transmitted through the client side. We recommend using the session token method to securely identify users.
129
+
The frontend method, by its nature, is not secure as the data is transmitted through the client side. It is recommended to use the session token method to securely identify users.
130
130
</Callout>
131
131
132
132
```jsx
133
133
window.plugSDK.init({
134
-
app_id:'<your_unique_app_id>',
135
-
identity: {
136
-
user_ref: string;
137
-
user_traits?: {
138
-
custom_fields?: object;
139
-
display_name?: string;
140
-
email?: string;
141
-
phone_numbers?: string[];
142
-
};
143
-
})
134
+
app_id:'<your_unique_app_id>',
135
+
identity: {
136
+
user_ref: string;
137
+
user_traits?: { // optional
138
+
custom_fields?: object; // optional
139
+
display_name?: string; // optional
140
+
email?: string; // optional
141
+
phone_numbers?: string[]; // optional
142
+
}
143
+
}
144
+
})
144
145
```
145
146
146
147
You can add or update the data in `user_traits` by using the `updateIdentity` method on the PLuG SDK. Attached is a sample code snippet for the same.
0 commit comments