Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
alias: (id: string) => {
if (doTracking) { Mixpanel.alias(id); }
},
reset: () => {
alias: id => {
if (envCheck) mixpanel.alias(id);
},
track: (name, props) => {
map(user => {
if (!user.agreement) {
this.authService.saveLoginRedirectPath(state.url);
this.router.navigate(['/', 'agreement']);
if (environment.analytics && environment.mixpanelKey) {
const userHash = hashUserId(user.id);
mixpanel.alias(userHash);
mixpanel.identify(userHash);
}
} else {
if (environment.analytics && environment.mixpanelKey) {
const userHash = hashUserId(user.id);
mixpanel.identify(userHash);
}
}
return user.agreement;
})
);