How do I add a WhatsApp button to my website?
Create a wa.me link with your number in international format and a first message, then add it to your site as a link styled as a button. The generator below gives you the HTML. Place the button next to your phone number and on every page where people decide, keep the tap area at least 24 by 24 pixels, and track clicks in Google Analytics as outbound clicks.
How to add the button
Build the link
Choose the country code and type your business number in the generator above, then pick a ready message, such as Website enquiry, or the one for your industry.
Copy the button code
Tap Copy website button code. You get a plain HTML link:
<a href="https://wa.me/..." target="_blank" rel="noopener">Chat on WhatsApp</a>.Paste it into your site
In a site builder, add an HTML or embed block and paste the code. In a theme, place it in the header, contact section or footer template. On a custom site, add it to the shared layout.
Style it as a button
Give the link padding, a clear label and a visible focus outline. Keep the tap area at least 24 by 24 CSS pixels, the WCAG 2.2 level AA minimum, and larger on phones where you can.
Place it where people decide
Put it beside the phone number in the header and on service, product and contact pages. On phones, a bar fixed to the bottom of the screen with Call and WhatsApp side by side sits under the thumb.
Write one message per page
Make a different first message for each key page, such as "Hello, I am asking about AC servicing", so your team knows what the visitor was reading.
Track the clicks
With enhanced measurement on in Google Analytics 4, a click on the wa.me link is recorded as an outbound click: the click event, with link_domain and link_url. Use it as your count of chat leads by page.
Test on a phone
Open the page on an iPhone and an Android phone, tap the button, and check that the chat opens with the right number and message.
Plain link, floating button or chat widget
All of them open the same chat. The difference is weight and control.
- Plain link or button in the page
- The fastest and simplest: no script, nothing to slow the page, and it works on any site. The right choice for most small business sites.
- Floating button
- A small button fixed in a corner, always in reach. Build it with a few lines of CSS on the same link, and keep it clear of cookie banners and the page's own buttons.
- Third party chat widget
- Adds a pop up, greeting text and sometimes several agents, but loads extra scripts on every page. Measure the cost with the website speed test before and after.
- Business Platform inbox or assistant
- For high volume, a shared inbox or an AI assistant answers and routes the chats. The button stays the same; what happens after the click changes.
Floating button code you can copy
Wrap the copied link in a class and add a few lines of CSS; no script is needed.
Replace the number and message with your own link from the generator, then paste these three lines.
HTML: <a class="wa-float" href="https://wa.me/971501234567?text=Hello" target="_blank" rel="noopener" aria-label="Chat with us on WhatsApp">Chat on WhatsApp</a>
CSS: .wa-float{position:fixed;right:16px;bottom:16px;z-index:50;padding:12px 18px;border-radius:999px;background:#25D366;color:#0B1F12;font-weight:600;text-decoration:none}
Focus: .wa-float:focus-visible{outline:3px solid #0B1F12;outline-offset:2px}
On Arabic pages, swap right:16px for left:16px so the button mirrors the layout. If the page already has a fixed bar at the bottom, raise bottom so the two never overlap.
WhatsApp button checklist
- The number is in international format and the link opens the right chat
- The button sits next to the phone number, not instead of it
- The tap area is at least 24 by 24 CSS pixels, with space around it
- The label says what happens: "Chat on WhatsApp", and the Arabic label on Arabic pages
- A floating button never covers the cookie banner, the menu or the checkout button
- Each key page carries its own first message
- Clicks show in Google Analytics as outbound clicks to wa.me
- Someone answers within the hours you state, and an away message covers the rest
- Any WhatsApp logo is the official one, unaltered, and not the most prominent thing on the page
Who adds a WhatsApp button
Home service businesses
Cleaning, maintenance and moving firms put the button on every service page, with the service named in the first message.
Clinics
Patients ask about appointments and directions; a button on each doctor and treatment page opens a chat with the right desk.
Online stores
A product page button with "Is this in stock?" catches buyers who would otherwise leave with an unanswered question.
Property brokers
Each listing page carries the agent's number and the listing reference in the first message.
Restaurants
A table booking button beside the menu turns readers into bookings; the restaurant website checklist covers the rest of the page.
Web developers
Developers add the plain link in minutes, with no plugin, and keep the page as fast as it was.
Worked example: one site, three messages
A home services site
Suppose a home services business has pages for AC servicing, pest control and deep cleaning. It makes three links in the generator, each with its own first message, such as "Hello, I would like a quote for AC servicing", and pastes each one on its page. The team sees the service in the first line of every chat, and Google Analytics shows the outbound clicks to wa.me page by page, so the owner knows which page brings conversations.
A slow widget replaced
Suppose a shop runs a chat widget that loads several scripts on every page. Running the website speed test before and after swapping it for the plain floating button shows what the widget cost. If the score improves and chats keep arriving, the plain button stays.
Do and do not
Do keep the phone number
Some visitors would rather call. Show both, side by side.
Do not open WhatsApp on its own
Opening a chat without a tap surprises visitors. Let them choose when to start.
Do respect the brand rules
WhatsApp's brand guidelines say not to change the logo's colours or alter it, not to make WhatsApp the most prominent feature of your materials, and not to suggest WhatsApp endorses you.
Do answer quickly
Set an away message with your expected response time in the WhatsApp Business app, so a late evening chat still gets a reply.
Do ask before marketing
A chat a customer starts is not permission to send offers later. Ask first and keep a record of the yes.
What changes in 2027 for website chat
Now
- Google Analytics 4 records clicks to other domains, wa.me included, as outbound clicks when enhanced measurement is on, with the link domain and address attached.
- WCAG 2.2 sets a minimum pointer target of 24 by 24 CSS pixels at level AA, which covers floating chat buttons on phones.
Next
- AdEngage UAE expects more UAE sites in 2027 to hand the first reply after a WhatsApp click to an AI assistant that answers in Arabic and English, with a person taking over for bookings and complaints.
- Keep the button light and fast, and put the effort into what happens after the click: replies, routing and follow up.