Skip to content

Commit

Permalink
Merge pull request #2033 from prince-deriv/analytics-guide
Browse files Browse the repository at this point in the history
Prince/ fix: await on hashing
  • Loading branch information
prince-deriv authored Oct 9, 2024
2 parents f481393 + 26f1f0c commit 9249dd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/scripts/analytics/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Version 1.0.3
// Version 1.0.4
const cacheTrackEvents = {
interval: null,
responses: [],
Expand Down Expand Up @@ -95,11 +95,11 @@ const cacheTrackEvents = {
storedCookies
)}; path=/; Domain=.deriv.com`;
},
processEvent: (event) => {
processEvent: async (event) => {
if (event?.properties?.email) {
const email = event.properties.email;
delete event.properties.email;
event.properties.email_hash = cacheTrackEvents.hash(email);
event.properties.email_hash = await cacheTrackEvents.hash(email);
}

return event;
Expand Down

0 comments on commit 9249dd5

Please sign in to comment.