More in Live chat
- Turn on the chat widget
- Two-way translation and AI replies
- Team members, roles and agent routing
- How do I add live chat to my website?
- Why is the chat bubble not showing?
- How do I change the chat widget’s color, position and greeting?
- What do visitors see when nobody is online?
- Can I share a chat link without a website?
- How do I hide the chat widget on some pages?
- How does two-way chat translation work?
- How do I set up AI replies from my knowledge base?
- How are AI calls counted in chat?
- What can each team role do?
- How do I invite a team member?
- Who on my team can see visitors’ personal data?
- How are conversations assigned to agents?
- How do I create and use canned replies in live chat?
- All guides in this category
Still have a question?
Could not find it? A person reads every message, usually within a few hours on business days.
Chat with usShort answer
Call tapcub.chat.open() from your button. It exists once the bubble has loaded, so check for it first.
A button that opens chat
Once the bubble is on the page, the launcher adds three methods to window.tapcub.chat: open(), close() and toggle().
<button type="button" onclick="window.tapcub && tapcub.chat ? tapcub.chat.open() : location.href = 'https://chat.askcub.com/YOUR_SITE_KEY'">
Chat with us
</button>The fallback opens the standalone chat page when the bubble is not available, so the button always does something.
When tapcub.chat is missing
- Chat is switched off, or the page has
data-chat="false". - Hide bubble on mobile is on and the visitor is on a phone or a narrow window.
- The launcher has not finished loading yet. It loads after the first pageview, so a click in the first moment after page load can come too early.
Did this answer your question?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.