How do I add a WhatsApp chat button to my website?
Paste a short piece of code into your website, just before the closing body tag. A WhatsApp button opens a chat with your number on the visitor's phone. A website chat box lets them talk to your AI Agent without leaving your site. Either way the chats land in your inbox.
Checked 23 November 2026 against Sonar itself.
2. A chat box answered by your AI Agent
For visitors who'd rather not leave your site: a chat bubble where they talk to your AI Agent, at any hour. Every chat lands in your inbox, where your team can step in.
In Sonar's Settings, open Connected apps, then Website chat. Press Switch on, then copy the code and paste it on every page, just before the closing body tag. Most website builders have a box for this, called something like "custom code" or "footer scripts". You can limit it to your own websites. Each AI reply counts as one of your plan's messages. The AI Agent answers by itself on plans that include it, from Plus. On other plans, or with the AI Agent off, chats wait in the inbox for your team.
Which to use
The button suits people who live on WhatsApp and want an answer on their phone. The chat box suits quick questions from people browsing on a computer. Many businesses use both. How the AI Agent answers is in the AI Agent guide. Every other way to start chats is in Get customers to message you.
More guides
- WhatsApp pricing in South Africa
- POPIA and WhatsApp marketing
- Event invites with one-tap RSVPs
- AI Agent and Copilot: a WhatsApp chatbot in your voice
- Set up your WhatsApp team inbox
- Use Sonar with the WhatsApp Business app
- Disconnect your WhatsApp Business app number
- Import your contacts
- Send your first WhatsApp broadcast in Sonar
- Order and booking updates from your other systems
- Sell on WhatsApp: catalog, orders and payment links
- Which number to use for WhatsApp
- What Meta needs from you before Sonar can send
- Plans and billing in Sonar: what you pay, and to whom
- Connect a client's WhatsApp number
- Two-step sign-in for your Sonar account
- WhatsApp API providers in South Africa, compared
- How WhatsApp flows work
- Automatic replies on WhatsApp: after hours, keywords and menus
- WhatsApp calls and voicemail
- Send WhatsApp calls to 3CX
- WhatsApp message templates: write one and get it approved
- Connect WhatsApp to n8n
- Connect WhatsApp to HubSpot
- What Sonar does that others don't publish
- Click-to-WhatsApp ads: answer every ad lead in time
- Get customers to message you on WhatsApp
- WhatsApp and Zoho CRM: a solar installer's journey, tested
- Answer Facebook Messenger and Instagram messages in Sonar
- Integrations: WhatsApp connected to your other tools
- Developers: API and webhooks
- Switching to Sonar
- WhatsApp marketing that earns B-BBEE points
- WhatsApp RSVPs for events
- WhatsApp calls on your phone system
- Competitions and prize draws
- WhatsApp error 2388386: why can't I add another number?
- WhatsApp error 131047: why wasn't my message delivered?
- Do you need 30 days on WhatsApp before Meta business verification?
- Can I move a WhatsApp number to another Meta business portfolio?
- WhatsApp error 131042: how do I add a payment method?
- Can I use my WhatsApp in Claude or ChatGPT?
- Can I connect Sonar to Zapier, Make or Google Sheets?
- How do I send a WhatsApp broadcast without my number getting blocked?
- How can my team share one WhatsApp number and inbox?
- How do I count clicks on a link in my WhatsApp broadcast?
- Which WhatsApp API providers keep message data in South Africa?
- How do I send WhatsApp abandoned cart reminders from my Shopify store?
- Can WhatsApp calls save money on an 0800 number or VoIP line?
- What are South African businesses paying for WhatsApp replies since 1 October 2026?
Need a hand?
Email [email protected] with your website's address. We'll tell you where the code goes for your website builder.