intercom / intercom-rails

The easiest way to install Intercom in a Rails app.
https://developers.intercom.io/reference
MIT License
281 stars 107 forks source link

Ability to hide chat for selected users/accounts #334

Open ro-savage opened 3 years ago

ro-savage commented 3 years ago

We would like the ability to exclude intercom chat for subset of users.

We can use exclude_if however this excludes them from all of intercom, including records their details, emails, stats etc.

We would like to just hide just the chat (javascript side) from certain users/companies. As we only provide live chat to runs when paid for.

Right now, we've basically got some JS that will delete intercom from the dom after the page loads. However, this hack isn't ideal.

Kenner-G commented 3 years ago

Do you not have a user database? You could just check among those parameters and if they aren't met (e.g. not a user) - don't return the Intercom widget code.