Skip to content

Commit

Permalink
Revert "fix: microsoft clarity identify error handling (#1948)"
Browse files Browse the repository at this point in the history
This reverts commit 33ac767.
  • Loading branch information
sanpj2292 authored Dec 9, 2024
1 parent 81b37a2 commit 8885a6a
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);

Check warning on line 58 in packages/analytics-js-integrations/src/integrations/MicrosoftClarity/browser.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-integrations/src/integrations/MicrosoftClarity/browser.js#L58

Added line #L58 was not covered by tests
if (context?.traits) {
const { traits } = context;
const keys = Object.keys(traits);
keys.forEach(key => {
window.clarity('set', key, traits[key]);

Check warning on line 63 in packages/analytics-js-integrations/src/integrations/MicrosoftClarity/browser.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-integrations/src/integrations/MicrosoftClarity/browser.js#L60-L63

Added lines #L60 - L63 were not covered by tests
});
}
}
}

Expand Down

0 comments on commit 8885a6a

Please sign in to comment.