Browse Source

account for user size in intercom

master
Martin McKeaveney 5 years ago
parent
commit
2523d54641
  1. 16
      packages/builder/src/stores/portal/auth.js

16
packages/builder/src/stores/portal/auth.js

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

Loading…
Cancel
Save