Fix bug where loaded event is not sent when no user ID (#106090)
This commit is contained in:
parent
59b56e5ac1
commit
ab010ae25c
|
@ -78,10 +78,11 @@ export const initializeFullStory = async ({
|
|||
try {
|
||||
// This needs to be called syncronously to be sure that we populate the user ID soon enough to make sessions merging
|
||||
// across domains work
|
||||
if (!userId) return;
|
||||
if (userId) {
|
||||
// Do the hashing here to keep it at clear as possible in our source code that we do not send literal user IDs
|
||||
const hashedId = sha256(userId.toString());
|
||||
fullStory.identify(hashedId);
|
||||
}
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`[cloud.full_story] Could not call FS.identify due to error: ${e.toString()}`, e);
|
||||
|
|
Loading…
Reference in a new issue