All posts

How to Add a WhatsApp Chat Button to Your Website (Step by Step)

Add a WhatsApp chat button to any website: the link format, a copy-paste floating button, WordPress and Shopify options, click tracking and what happens after the click.

.wt-cb{line-height:1.7}.wt-cb .tw{overflow-x:auto;margin:0 0 18px}.wt-cb table{width:100%;border-collapse:collapse;min-width:480px;font-size:15px}.wt-cb th,.wt-cb td{border:1px solid #dfe8e4;padding:10px 12px;text-align:start;vertical-align:top}.wt-cb th{background:#e9f9f0}.wt-cb .box{background:#f6faf8;border-left:5px solid #25d366;border-radius:10px;padding:16px 20px;margin:24px 0}.wt-cb pre{background:#0f1f1a;color:#e6f5ee;border-radius:10px;padding:14px 18px;overflow-x:auto;font-size:14px;line-height:1.5}.wt-cb code{font-family:ui-monospace,Menlo,monospace}.wt-cb .btn{display:inline-block;background:#25d366;color:#04281f;font-weight:700;padding:12px 24px;border-radius:999px;text-decoration:none;margin:6px 8px 6px 0}.wt-cb .btn2{background:#fff;border:2px solid #25d366}.wt-cb details{border:1px solid #dfe8e4;border-radius:12px;padding:12px 16px;margin:0 0 10px}.wt-cb summary{cursor:pointer;font-weight:600}

A WhatsApp chat button lets a visitor start a conversation with your business in one tap, without copying a phone number or filling in a form. It takes about five minutes to add, needs no developer for the basic version, and works on any website builder. This guide covers the link format, a copy-paste floating button, WordPress and Shopify options, how to track clicks, and what to do once the messages start arriving.

The short answerBuild your link: https://wa.me/YOURNUMBER, with the number in international format and no plus sign, spaces or leading zeros.Add a pre-filled message with ?text= so every chat starts with context.Put it on a button: a normal link in your page, a floating button fixed to the corner of the screen, or the Wetarseel website chat widget if you want chats to stay on your site.Test it on a phone and a desktop.Track clicks and decide who answers the chats.

Step 1: Build your click-to-chat link

WhatsApp's click-to-chat link opens a conversation with your number. The format is:

https://wa.me/971585392490

Use your full number with the country code. For a UAE number written as +971 58 539 2490, the link number is 971585392490. Remove the plus, any spaces or dashes, and any zeros before the country code.

Add a pre-filled message

Add ?text= and your message, with spaces written as %20:

https://wa.me/971585392490?text=Hi%2C%20I%20have%20a%20question%20about%20your%20pricing

A pre-filled message tells you what the visitor wants before they type anything. You can use a different message on each page, for example "I want to book a table" on a restaurant page and "I need help with an order" on a support page. Use %0A for a line break and %2C for a comma.

Step 2: Add the button to your page

Option A: a simple button or link

Paste this wherever you want the button to appear:

<a href="https://wa.me/971585392490?text=Hi%2C%20I%20need%20help"
   target="_blank" rel="noopener">Chat with us on WhatsApp</a>

Any button in your page builder can do the same job. Set its link to your wa.me address and choose "open in new tab".

Option B: a floating button in the corner

A floating button stays visible as the visitor scrolls. Add this to your site's footer or custom HTML area:

<a class="wa-float" href="https://wa.me/971585392490?text=Hi%2C%20I%20need%20help"
   target="_blank" rel="noopener" aria-label="Chat on WhatsApp">Chat on WhatsApp</a>
<style>
.wa-float{position:fixed;right:20px;bottom:20px;z-index:9999;
  background:#25d366;color:#04281f;font:600 15px/1 sans-serif;
  padding:14px 20px;border-radius:999px;text-decoration:none;
  box-shadow:0 4px 14px rgba(0,0,0,.25)}
</style>

Change the number, the message and the colours to suit your brand. If you have a cookie banner or another widget in the same corner, move the button with left or a larger bottom value.

Option C: the Wetarseel website chat widget

The first two options send visitors out to the WhatsApp app. Wetarseel also has an embeddable website chat widget that keeps the conversation on your site and brings it into the same team inbox as your WhatsApp chats.

  • A floating launcher sits in the corner of your site. Clicking it opens a chat panel.
  • A short pre-chat form asks for the visitor's name and email, with phone number optional, so every chat starts as a contact you can follow up.
  • Replies come from your team inbox. Website chats appear in live chat under their own Website Chat channel, and your agents answer them from the same screen as WhatsApp.
  • One script to install. Turn on Website Chat in your Wetarseel settings, add your site's domain to the allowed list, copy the embed script and paste it just before the closing </body> tag. On Shopify, paste it into layout/theme.liquid or a Custom Liquid section.

The script you copy from Settings looks like this, with your own widget key:

<script>
(function(w,d,s,o){w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};
var j=d.createElement('script');j.async=1;j.src='https://YOUR-APP-URL/embed/webchat.js';
d.head.appendChild(j);})(window,document,'script','wtChat');
wtChat('init', { widgetKey: 'wk_your_key' });
</script>

Always copy the real script from your Wetarseel settings, because it holds your own widget key and address. Website chat is a separate channel from WhatsApp, so it suits visitors who would rather not leave your site or who do not use WhatsApp. Automations and AI replies are not switched on for website chat messages yet.

Step 3: Use your website platform's built-in options

PlatformHow to add the button
WordPressEither paste the snippet above into a Custom HTML block or your theme's footer, or install a WhatsApp chat plugin and enter your number and message in its settings.
ElementorAdd a Button widget and set its link to your wa.me address. For a floating button, use an HTML widget with the snippet.
ShopifyAdd the link as a button in your theme editor, or paste the floating snippet into the theme's footer file. A chat app from the Shopify store is the no-code route.
Wix, Squarespace, WebflowUse a button element linked to your wa.me address, or an embed or custom-code block for the floating version.
Plain HTML sitePaste the snippet before the closing body tag.

Menus and steps change between versions of these tools, so if a setting is not where you expect it, search the platform's help for "custom HTML" or "add a button link".

Step 4: Test it

  • On a phone with WhatsApp installed: the button should open a chat with your number and the pre-filled message.
  • On a desktop: the link opens WhatsApp Web or the desktop app, or asks the visitor to continue in the browser.
  • On a phone without WhatsApp: the visitor is sent to a page to install it, so keep a second contact method such as a form or email nearby.
  • The number: send a message yourself and confirm that the right person receives it.

Step 5: Track clicks

WhatsApp does not tell your website who clicked, so measure the click itself. With Google Analytics 4 installed, add this to the link to log a click event:

<a href="https://wa.me/971585392490" target="_blank" rel="noopener"
   onclick="gtag('event','whatsapp_click',{page:location.pathname})">Chat on WhatsApp</a>

Then mark whatsapp_click as a key event in GA4. You can also put a short code in the pre-filled message, such as "Hi, I found you on the pricing page", so your team can see which page each chat came from.

What happens after the click

When a customer messages you first, WhatsApp opens a 24-hour window in which you can reply freely. After the window closes, you need an approved template message to contact them again.

  • On the WhatsApp Business app, chats land on one phone. That works for a very small team, but it is hard to share between people.
  • On the WhatsApp Business API, messages go to a shared inbox, so several agents can answer (compare it with a Freshdesk or Zendesk helpdesk), and you can add a chatbot flow to answer the first question or collect details before a person takes over. Check Meta's current rules before running the same number on both the app and the API.

The same wa.me link works with either, so you can start with the simple button and move to the API when volume grows. See what the API costs and the Wetarseel plans.

Best practices

  • Say what the button is for. "Ask about pricing" converts better to a real conversation than a bare icon, but test the wording on your own visitors.
  • Put it where questions arise: pricing, product, checkout and contact pages.
  • Answer quickly. A chat button creates an expectation of a fast reply. Show your working hours near it if you cannot answer around the clock.
  • Do not message visitors back without permission. A customer starting a chat gives you a window to answer, not consent to send promotions. Read the opt-in rules.
  • Do not hide other options. Keep a form or email available for people who prefer them.

Common problems

ProblemLikely cause and fix
Link says the number is invalidThe number has a plus sign, spaces or a leading zero. Use digits only, starting with the country code.
Pre-filled text looks brokenSpecial characters are not encoded. Encode spaces as %20, commas as %2C and line breaks as %0A.
Button hidden behind another widgetMove it with the left or bottom values, or raise its z-index.
Button not showing on some pagesThe snippet is in a page-level block instead of the site footer. Move it to the global footer.
Chats go unansweredOne phone is the only receiver. Share the inbox with your team.

Turn the button into a proper support channel with Wetarseel

Wetarseel connects your number to the official WhatsApp Business API, with a shared team inbox, a no-code flow builder and a website chat widget that feeds the same inbox. Our team helps you set up and stays available afterwards. Start with the button today and add the inbox when the messages start coming in.

Start your free trialChat with us on WhatsApp

Frequently asked questions

How do I add a WhatsApp chat button to my website?

Create a link in the form https://wa.me/ followed by your number in international format, and attach it to a button or a floating element on your site. Test it on a phone and a desktop.

Is the WhatsApp chat button free?

The click-to-chat link itself is free. Costs only arise if you use the WhatsApp Business API, where Meta charges for some message categories and your platform charges a plan.

Can I show a different message on different pages?

Yes. Change the text after ?text= in the link on each page, so each chat starts with context about that page.

Does Wetarseel have a website chat widget?

Yes. Turn on Website Chat in your Wetarseel settings, allow your domain, and paste the embed script before the closing body tag. Visitors fill in a short form, and your team answers from the same inbox as WhatsApp.

Do I need the WhatsApp Business API for a chat button?

No. The button works with a normal WhatsApp or WhatsApp Business app number. The API becomes useful when several people need to answer chats or you want automation.

How do I know how many people click the button?

Add a click event with Google Analytics 4 or your tag manager. WhatsApp itself does not report website clicks.

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How do I add a WhatsApp chat button to my website?","acceptedAnswer":{"@type":"Answer","text":"Create a link in the form https://wa.me/ followed by your number in international format, and attach it to a button or a floating element on your site. Test it on a phone and a desktop."}},{"@type":"Question","name":"Is the WhatsApp chat button free?","acceptedAnswer":{"@type":"Answer","text":"The click-to-chat link itself is free. Costs only arise if you use the WhatsApp Business API, where Meta charges for some message categories and your platform charges a plan."}},{"@type":"Question","name":"Can I show a different message on different pages?","acceptedAnswer":{"@type":"Answer","text":"Yes. Change the text after ?text= in the link on each page, so each chat starts with context about that page."}},{"@type":"Question","name":"Does Wetarseel have a website chat widget?","acceptedAnswer":{"@type":"Answer","text":"Yes. Turn on Website Chat in your Wetarseel settings, allow your domain, and paste the embed script before the closing body tag. Visitors fill in a short form, and your team answers from the same inbox as WhatsApp."}},{"@type":"Question","name":"Do I need the WhatsApp Business API for a chat button?","acceptedAnswer":{"@type":"Answer","text":"No. The button works with a normal WhatsApp or WhatsApp Business app number. The API becomes useful when several people need to answer chats or you want automation."}},{"@type":"Question","name":"How do I know how many people click the button?","acceptedAnswer":{"@type":"Answer","text":"Add a click event with Google Analytics 4 or your tag manager. WhatsApp itself does not report website clicks."}}]}

Discussion

No comments yet