Open the chat widget from your own button

Updated Nov 28, 20263 min read
English
On this page

You can hide the round chat bubble of your live chat and open the chat from your own button or link instead. The widget code stays on your page, and only the bubble is hidden.

Set it up

The Look panel with Where is the chat button? and the switch Show the round chat button, turned on
  1. Go to Settings > Inboxes.
  2. Click your live chat inbox.
  3. Click Look.
  4. Switch off Show the round chat button.
  5. Click Save.
  6. Keep the widget code on your site. You find it under On your website, which then also shows the line your button calls. If it is not installed yet, see Embed the chat widget code.
  7. Add a button or link that calls window.deskwootWidget.open():
<button onclick="window.deskwootWidget.open()">Contact support</button>

A link works the same way:

<a href="#" onclick="window.deskwootWidget.open(); return false;">Contact support</a>

Your button can look like anything: text, your own icon or a picture, styled like the rest of your site.

Without the bubble, visitors can open the chat only through your button, so your page needs that button. A chat trigger, if you set one up, still opens the chat on its own on desktop.

More you can do

  • window.deskwootWidget.close() closes the chat and window.deskwootWidget.toggle() opens or closes it, so one button can do both.
  • window.deskwootWidget.open({ anchor: this }) lets the chat grow out of your button instead of the corner of the page. A CSS selector like "#support-button" works as the anchor too.
  • window.__deskwootUnread holds the number of new replies from your team or your AI bot that arrived while the chat was closed, for a badge on your button. Opening the chat sets it back to 0. Each change also fires a deskwoot:unread event on window.
  • window.deskwoot is the same object as window.deskwootWidget.

The full reference is in the widget documentation. The colors and texts of the chat itself are covered in Customize your chat widget.

Frequently asked questions

Can I put my own icon on the round chat button instead?

Yes, on the Enterprise plan. Under Look, Which icon does the chat button show? puts your own icon on the round chat button instead of the Deskwoot face (Upload icon, JPG, PNG or GIF up to 2 MB). Your own button works on every plan. See Customize your chat widget.

Nothing happens when I click my button. What should I check?

Make sure the widget code is on that same page and that the button calls window.deskwootWidget.open() exactly as written, with the parentheses.

What if a visitor clicks before the widget has loaded?

Calls made while the widget is still starting are queued and run once it is ready. Only code that runs before the widget code itself needs a check like if (window.deskwootWidget).

Can I show the bubble on some pages and my button on others?

Switching off Show the round chat button applies to every page that uses this inbox's widget. For the bubble on some pages, keep the switch on and add your own button where you want it. The bubble and your button open the same chat.

Which inboxes have this setting?

Live chat (website) inboxes. Other channels have no widget, so only a live chat inbox has the row Look with this switch.

Was this guide helpful?

Keep reading

Still need help?

Fynn answers from these guides in the chat, and you can reach the team there too.