Skip to main content
Answered

Just showing the Intercom widget after boot without show/hide

  • April 30, 2024
  • 1 reply
  • 220 views

export async function bootIntercom(open = true) {
  const app_id = window.intercomSettings?.app_id
  await loadScript(`https://widget.intercom.io/widget/${app_id ?? 'XXXXXXX'}`)
  window.Intercom('boot', window.intercomSettings ?? { app_id: 'XXXXXXX' })
  // the intercom widget needs to be shown once for it to stay closed, in button shape
  window.Intercom('show')
  window.Intercom('hide')

  if (open) {
    window.Intercom('show')
  }
}

Hello! We have Intercom integrated in our website and until now, relied on Users clicking on a Facade button to open and boot intercom. However, we want to get rid of that and just boot the messenger button widget on the bottom of the page automatically.

The only solution I can come up with is this. First “show” and then “hide”  to present the user with the button. 
Is this a bug? I think just calling “boot” should be sufficient to show the button?

 

If  `open` is true, the messenger opens with no issue.

Thanks in advance

Best answer by mateusz.leszkiewicz

Hi Sascha, It’s Mat from the Support Engineering Team 😀

I would recommend ditching all JS methods altogether and paste the Installation snippet at the bottom of the BODY tag of your page.

In that way, you’ll have the ability to show/hide Messenger with the proper settings in the workspace.

View original
Did this topic help you find an answer to your question?

1 reply

mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi Sascha, It’s Mat from the Support Engineering Team 😀

I would recommend ditching all JS methods altogether and paste the Installation snippet at the bottom of the BODY tag of your page.

In that way, you’ll have the ability to show/hide Messenger with the proper settings in the workspace.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings