Skip to content
Back to blog

WhatsApp Chat Button for Your Website: Setup and Tracking

Add a WhatsApp chat button to your website with a wa.me link, page-specific prefilled messages and a simple way to see which pages start real conversations.

Chat bubble cover for the WhatsApp chat button for website guide

A WhatsApp chat button on your website lets visitors start a conversation in one tap instead of filling in a form and waiting for an email. It is one of the cheapest lead sources a business can add, and it works with both the WhatsApp Business app and the official API.

This guide shows the link format, a copy-paste button, how to make the opening message useful for your team and how to see which pages actually produce conversations.

How a WhatsApp chat button works

The button is a link to wa.me. When a visitor taps it, WhatsApp opens a chat with your business number, often with a message already typed. The visitor presses send, and the conversation starts in your WhatsApp inbox.

Because the customer writes first, this also opens a customer service window on the API: for the next 24 hours your team can reply with normal messages, without needing an approved template.

PartRuleExample
BaseAlways https://wa.me/https://wa.me/
NumberFull international number: country code, no plus sign, no spaces, dashes or leading zero966501234567
Prefilled text (optional)Add ?text= with URL-encoded words?text=Hi%2C%20I%20need%20a%20quote

A Saudi number written locally as 050 123 4567 becomes 966501234567: drop the leading 0, add 966. An Egyptian number 010 1234 5678 becomes 201012345678. If you do not want to encode text by hand, our free WhatsApp link generator builds the link for you.

A copy-paste floating button

Paste this before the closing </body> tag and replace the number and text:

<a href="https://wa.me/966501234567?text=Hi%2C%20I%27m%20on%20your%20pricing%20page"
   target="_blank" rel="noopener"
   style="position:fixed;right:16px;bottom:16px;padding:12px 16px;
          border-radius:24px;background:#25D366;color:#fff;
          font:600 15px sans-serif;text-decoration:none">
  Chat on WhatsApp
</a>

Keep the label explicit ("Chat on WhatsApp"), make sure the button does not cover cookie banners or checkout buttons on mobile, and test it on both a phone and a desktop with WhatsApp Web.

Make the first message work for your team

A blank chat that says "Hi" forces your team to ask what the visitor wants. A prefilled message per page does that job for you:

  • Pricing page: "Hi, I'm on your pricing page and have a question about plans."
  • Product page: "Hi, I'm interested in [product name]."
  • Support page: "Hi, I need help with an existing order."

The visitor can still edit the text before sending, so keep it short and polite.

Worked example: tracking which pages start conversations

WhatsApp chats do not carry website analytics tags, so the simplest tracking method is a short reference in each page's prefilled text. A Jeddah furniture store set three references:

PagePrefilled text ends withChats in 30 days (example)Orders (example)
Home page[HP]404
Sofa category[SOFA]9018
Delivery FAQ[DLV]603

Conversion per chat: Home 4 ÷ 40 = 10%; Sofa 18 ÷ 90 = 20%; Delivery FAQ 3 ÷ 60 = 5%. The sofa page deserves a more visible button; the delivery FAQ chats are mostly support, so they should route to the support team, not sales. These numbers are illustrative; your own counts come from tagging chats in your inbox.

The same idea applies to ads: see Click-to-WhatsApp ads setup and tracking.

What happens after the click

A button only helps if someone answers. Decide in advance:

  1. Who replies during and after working hours.
  2. What is automated, such as a greeting, opening hours or an order-status lookup. See seven WhatsApp automation workflows.
  3. How chats are tagged by page reference so the tracking above works.

How WA Smart Sender helps

With WA Smart Sender, chats from your website button land in a shared WhatsApp inbox where several team members can reply from one number, and WhatsApp automation can greet visitors, read the page reference and route the chat. See plans and pricing.

FAQ

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

No. A wa.me link works with the WhatsApp Business app too. The API matters when several people need to answer, or when you want automation and reporting.

Usually the number includes a plus sign, a leading zero or spaces. Use the full international number with digits only.

Can I see which page a chat came from?

Not automatically. Add a short reference to each page's prefilled message and tag chats by that reference.