We have a handful of “Send us a Message” or “Contact Us” buttons around our web application that open Intercom to
showNewMessage, but the Intercom Messenger isn’t always available. In some cases, Intercom isn’t fully loaded when the click the button or they just have Intercom blocked (eg. adblocker type extensions). This affects at least 5% of our users, though rarely comes up…
Ideally, I would like these buttons/links to attempt to open Intercom and fallback to opening an email in a new tab instead. The issue is just detecting when to fallback if Intercom is unavailable.
The first thought was to use
Intercom('getVisitorId'), but that appears to always return
undefined nowadays (on all environments), though this did work months ago. Bit confused why this has broken and this previous post doesn’t answer that.
The only other approach I could see was to hack together a timeout with
Intercom('onShow', …) if the callback doesn’t fire, open a new tab. The user experience with this isn’t great, but if that’s the only option, it might just do.
Is there any approach I’m missing to detect this?