Skip to content

Commit

Permalink
fix: revert ms-clarity identify promise handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Dec 9, 2024
1 parent 19c52ee commit aa92760
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ class MicrosoftClarity {
if (context?.traits?.customPageId) {
customPageId = context.traits.customPageId;
}
window.clarity('identify', userId, sessionId, customPageId).then(() => {
if (context?.traits) {
const { traits } = context;
const keys = Object.keys(traits);
keys.forEach(key => {
window.clarity('set', key, traits[key]);
});
}
}).catch(error => {
logger.error('Error in identify call', error);
});
window.clarity('identify', userId, sessionId, customPageId);
if (context?.traits) {
const { traits } = context;
const keys = Object.keys(traits);
keys.forEach(key => {
window.clarity('set', key, traits[key]);
});
}
}
}

Expand Down

0 comments on commit aa92760

Please sign in to comment.