posthog attribution adjustment

This commit is contained in:
Vladyslav Matsiiako
2023-05-27 19:12:32 -07:00
parent c730280eff
commit a6f6711c9a
3 changed files with 27 additions and 10 deletions
@@ -120,7 +120,7 @@ const attemptLogin = async (
}
if (email) {
telemetry.identify(email);
telemetry.identify(email, email);
telemetry.capture('User Logged In');
}
@@ -22,10 +22,12 @@ class Capturer {
}
}
identify(id: string) {
identify(id: string, email?: string) {
if (ENV === 'production' && TELEMETRY_CAPTURING_ENABLED) {
try {
this.api.identify(id);
this.api.identify(id, {
email: email
});
} catch (error) {
console.error('PostHog', error);
}