|
|
|
@ -54,13 +54,15 @@ export function createAuthStore() { |
|
|
|
if (user) { |
|
|
|
analytics.activate().then(() => { |
|
|
|
analytics.identify(user._id, user) |
|
|
|
// TODO: check if the user is a certain org size
|
|
|
|
// analytics.showChat({
|
|
|
|
// email: user.email,
|
|
|
|
// name: user.name,
|
|
|
|
// user_id: user._id,
|
|
|
|
// tenant: user.tenantId
|
|
|
|
// })
|
|
|
|
if (user.size === "100+" || user.size === "10000+") { |
|
|
|
analytics.showChat({ |
|
|
|
email: user.email, |
|
|
|
created_at: user.createdAt || Date.now(), |
|
|
|
name: user.name, |
|
|
|
user_id: user._id, |
|
|
|
tenant: user.tenantId |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|