releasebird-javascript-sdk 1.0.87 → 1.0.88
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/build/index.js +1 -1
- package/package.json +3 -2
- package/published/1.0.87/index.js +1 -1
- package/published/1.0.88/index.js +1 -0
- package/published/latest/index.js +1 -1
- package/src/RbirdFormManager.js +7 -2
- package/src/RbirdSurveyManager.js +720 -0
- package/src/RbirdWebsiteWidget.js +42 -1
- package/src/index.js +22 -0
package/src/RbirdFormManager.js
CHANGED
|
@@ -351,10 +351,15 @@ export class RbirdFormManager {
|
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
+
// Determine user info - use identified user data or fallback to visitor with anonymous ID
|
|
355
|
+
const userEmail = state?.identify?.properties?.email || state?.identify?.email || null;
|
|
356
|
+
const userName = state?.identify?.properties?.name || state?.identify?.name ||
|
|
357
|
+
(sessionManager.anonymousIdentifier ? `Visitor (${sessionManager.anonymousIdentifier.substring(0, 8)})` : 'Visitor');
|
|
358
|
+
|
|
354
359
|
http.send(JSON.stringify({
|
|
355
360
|
data: data,
|
|
356
|
-
userEmail:
|
|
357
|
-
userName:
|
|
361
|
+
userEmail: userEmail,
|
|
362
|
+
userName: userName
|
|
358
363
|
}));
|
|
359
364
|
}
|
|
360
365
|
|