Skip to content

Web Design

How to Add a WhatsApp Button to Your Website Properly

How to add a WhatsApp button to a business website in Malaysia so it converts and is measured: the wa.me link, pre-filled messages, placement, GA4.

By Zahid Aramai

How to Add a WhatsApp Button to Your Website Properly

Most of my clients’ customers do not fill in forms. They tap WhatsApp. On my own site the ratio is roughly nine WhatsApp conversations for every contact form, and the sites I build for clinics, contractors and shops in Malaysia show the same pattern. So the WhatsApp button is not a nice extra; it is the main conversion point of the website, and it deserves to be done properly.

Panel comparing nine WhatsApp conversations with one contact form enquiry on zahidaramai.com
On my own site roughly nine enquiries arrive on WhatsApp for every one that comes through the contact form.

Properly means four things: the right link, a message that tells you where the lead came from, placement where people actually tap, and measurement so you know which pages work. Here is how to do each.

A WhatsApp button is a link to https://wa.me/ followed by your number in international format with no plus sign, spaces or dashes. For a Malaysian mobile number 011-1234 5678 the link is https://wa.me/601112345678. On a phone it opens WhatsApp; on a desktop it opens WhatsApp Web or the app.

WhatsApp’s own help page describes the same rule: the full number in international format, with no zeros, brackets or dashes in front.

WhatsApp Help Center article How to use click to chat, showing the wa.me link format and the pre-filled message format
The official WhatsApp Help Center page on click to chat, which documents both the wa.me link and the text parameter.

The pattern is the country code 60, then the number without its leading zero. A number written 012-345 6789 becomes 60123456789. The most common mistake is keeping the zero and sending people to 600123456789, which WhatsApp rejects as an invalid number, so the customer never reaches you.

The four parts of a WhatsApp link, and the leading zero mistake https://wa.me/ 60 1112345678 ?text=Hi... address country number without 0 message (optional) Right wa.me/60 123456789 opens the chat Wrong wa.me/60 0 123456789 invalid number the zero after 60 has to go
A WhatsApp link is the wa.me address, the country code, the number without its leading zero, and an optional message.

The same conversion for the ways people usually write a Malaysian number:

Number as written In the link
011-1234 5678 601112345678
012-345 6789 60123456789
+60 12-345 6789 60123456789
012-345 6789 with the zero kept 600123456789, invalid

Use a WhatsApp Business account on a number that belongs to the business, not to a staff member who may leave. The business profile adds your hours, address and catalogue, and gives you labels and quick replies for handling leads.

2. The pre-filled message

Add ?text= to the link and the customer’s message is pre-written. Two reasons to do this. First, people hesitate when faced with a blank chat; “Hi, I would like a quotation for a business website” removes the hesitation. Second, the message tells you which page and which offer the person was looking at, which is the cheapest attribution you will ever get.

This is what a visitor sees after tapping the quotation button on my site from a desktop: the business name and the message already written, waiting to be sent.

WhatsApp click to chat page for Zahid Aramai Freelance Website Developer with the message Hi Zahid, I would like a quotation for a website already filled in
The real wa.me page behind my quotation button, with the pre-filled message shown above Open app and Continue to WhatsApp Web.

Write a different message for each placement: the home page, each service, each package on the pricing page, each product. Keep them short and natural, and remember that spaces and punctuation have to be URL-encoded; any online encoder does it, and WordPress link fields usually handle it for you.

These are the messages behind some of the buttons on my own site; each button also carries its own placement label for tracking:

Button Pre-filled message
Header, every page Hi Zahid, I would like a quotation for a website.
Home page hero Hi Zahid, I would like a quote for a website
Home page, speed service Hi Zahid, my WordPress website is slow. Can you help speed it up?
Pricing, Landing Page card Hi Zahid, I’m interested in the Landing Page package (from RM2,500).
Pricing, Business Website card Hi Zahid, I’m interested in the Business Website package (from RM4,500).
Pricing, Website Care Plan card Hi Zahid, I’m interested in the Website Care Plan package (from RM250/month).
Floating button on phones Hi Zahid, I found your website and would like to ask about a project.
Landing Page, Business Website and WooCommerce Store package cards on the zahidaramai.com pricing page, each ending in its own Ask about WhatsApp button
On my pricing page every package card has its own WhatsApp button, so the first message already names the package and its starting price.

Write the message in plain words first, then encode it. A space becomes %20, a comma %2C, a question mark %3F, a new line %0A, and an ampersand %26. The ampersand matters most: left raw, it cuts your message off at that point.

Sign and code If left raw
space %20 Usually fixed by the browser, not always
comma %2C Mostly harmless, encode it anyway
question mark %3F Can confuse some link fields
new line %0A The line break is lost
ampersand %26 The message stops at that point
Plain message:
Hi, I would like a quotation for a business website.

Encoded link:
https://wa.me/601112345678?text=Hi%2C%20I%20would%20like%20a%20quotation%20for%20a%20business%20website.
A raw ampersand cuts the pre-filled message short; an encoded one keeps it whole Raw ampersand ?text=Quote%20for%20logo%20&%20web Chat box: Quote for logo cut off Encoded as %26 ?text=Quote%20for%20logo%20%26%20web Chat box: Quote for logo & web complete
The same message with a raw ampersand and with %26: only the encoded version reaches the chat box in full.

Here is how the messages might differ across a site, using the same number:

  • Home page: “Hi, I found your website and would like to ask about a quotation.”
  • Pricing page: “Hi, I am interested in the business website package. Can we talk?”
  • Product page: “Hi, is this item in stock? (product name)”
  • Contact page: “Hi, I would like to book a call.”

Each one tells you what the person wanted before you reply, so your first answer can be specific instead of a generic greeting.

Test every link on a real phone before it goes live. Tap it, read what appears in the chat box, and check that nothing is cut off. If you have a product page, put the product name in the message so you do not have to ask which one they mean.

3. Placement

The button belongs wherever a visitor has just read enough to want to talk: above the fold on the home page, at the end of each service description, next to each price, under each product, in the footer, and on the contact page as the first option.

Placement Its job
Header button Always one tap away, on every page
Hero button For visitors who are ready on the first screen
End of each service, next to each price Catches the reader who now has the facts
Floating button, phones only Stays visible while scrolling
Contact page, first option The fastest route for people who came to talk
Thank-you and 404 pages Recovers warm and lost visitors
Footer A last chance after the full page

On phones add a floating button in the bottom corner that stays visible while scrolling. Keep it small and quiet; a bouncing green circle that covers the content annoys more than it converts. On the contact page itself, hide the floating button because the full contact block is already there.

Here is how that looks on my own site on a phone: the header and hero buttons on the first screen, and the floating button once the visitor scrolls past it.

Two phone screenshots of zahidaramai.com, the first screen with a WhatsApp header button and a Get a Quote on WhatsApp button, and a scrolled view with the floating WhatsApp Zahid button
Real captures of zahidaramai.com at phone width: header and hero buttons first, then the floating button after scrolling.

Make it look like a button, not a text link, and label it with what happens: “WhatsApp Zahid”, “Get a quote on WhatsApp”, “Ask about this package”. The WhatsApp icon helps; the label does the work.

The zahidaramai.com contact page with WhatsApp Zahid in the header and two cards whose first buttons are Whatsapp Now and Ask Quotation
On my contact page WhatsApp is the first option in both cards, and the header button carries the plain label WhatsApp Zahid.

One more placement that is easy to forget: the thank-you or confirmation screen after a form is sent, and the 404 page. A visitor who has just filled in a form is the warmest lead on the site, and a visitor who hit a broken link is one tap from leaving. A WhatsApp button on both pages recovers conversations that would otherwise be lost.

Adding the button in WordPress and Elementor

You do not need a plugin. In Elementor, drag a Button widget onto the page, paste the encoded wa.me link into the Link field, and write the label. In the block editor, add a Buttons block and paste the link the same way. In a menu, add a Custom Link item and use the link as the URL.

Where What to do
Elementor Button widget, link in the Link field
Block editor Buttons block, link from the toolbar link icon
Menu Custom Link item, link in the URL field
Floating button on phones HTML widget or theme code with a placement attribute
WordPress block editor with a new Button block selected and its link field open, showing the placeholder Search or type URL
A real WordPress block editor: after inserting a Buttons block, the link icon in the toolbar opens the field where the wa.me link goes.

For the floating button on phones, add an HTML widget or a small block of theme code with a fixed-position link, and use a CSS media query to show it only below a tablet width. Give each button a data-placement attribute, which you will use for tracking in the next section.

<a class="wa-float"
   href="https://wa.me/601112345678?text=Hi%2C%20I%20have%20a%20question."
   data-placement="floating"
   aria-label="Chat on WhatsApp">WhatsApp</a>

Open the link in a new tab on desktop only if you must; on phones the default behaviour hands over to the WhatsApp app, which is what you want.

4. Measurement

A button you cannot measure is a button you cannot improve. In Google Analytics 4, set up an event for clicks on links that contain wa.me and attach two parameters: the page path and a placement label such as hero, pricing-business-website or footer. Google Tag Manager does this in a few minutes; WordPress analytics plugins can do it too.

From a tap on the button to a GA4 report split by placement 1 Visitor taps a wa.me button 2 Script sends whatsapp_click 3 GA4 counts it as a key event 4 Report by page and placement
Four steps from a tap to a number you can act on; the placement label is what makes step four possible.

The event carries three pieces of information:

Field Example and source
Event name whatsapp_click, sent by the script or the Tag Manager tag
Button label hero or footer, read from the data-placement attribute
Page path /contact-me/, the address of the page

Once the event exists, mark it as a key event in GA4 and import it into Google Ads as a conversion if you advertise. Now a month of data tells you that the pricing page produces three times the WhatsApp taps of the services page, and you know where to put your effort. On the sites I build every WhatsApp link carries a placement attribute and the event is wired before launch, because adding it later means losing the baseline.

A simple GA4 click event

If you are not using Tag Manager, a few lines of script will send the event. It listens for clicks on any link to wa.me and sends the placement and page along with it.

<script>
document.addEventListener('click', function (e) {
  var link = e.target.closest('a[href*="wa.me"]');
  if (!link || typeof gtag !== 'function') return;
  gtag('event', 'whatsapp_click', {
    placement: link.dataset.placement || 'unknown',
    page_path: location.pathname
  });
});
</script>

After you publish, open GA4 and look at Realtime or DebugView, tap a button on your phone, and confirm the event appears with the right parameters. Then, in the GA4 admin under Events, mark whatsapp_click as a key event. To split the report by button, register placement as a custom dimension; it only starts filling in from the day you register it.

Illustration of a whatsapp_click event with the parameters placement pricing-business-website and page_path web-design-price-malaysia, followed by three steps: tap, check DebugView, mark as key event
Illustration, not a GA4 screenshot: the event name and the two parameters you should see in DebugView after one test tap.

Remember that a tap is not a conversation. Some people tap and close WhatsApp without sending. The tap count is the best number you have on the website side, so judge pages by it, and judge the real result by counting the chats in your WhatsApp Business inbox.

Taps, chats, quotes and wins: each stage is smaller than the one before Taps on the button GA4 Chats actually sent inbox Quoted label Won label
Illustration, not data: GA4 sees the taps, and only your WhatsApp Business inbox and its labels show the chats, quotes and wins.

5. Speed and privacy

A plain link weighs nothing. Chat widgets that load a floating window from a third-party server weigh a lot, slow the first paint and sometimes set tracking cookies you then have to disclose. If you want the floating button, build it as a link with a little CSS, not as a widget. If you need multiple agents or routing, use the WhatsApp Business app’s features or the API rather than a front-end widget.

Plain link Chat widget
Script from another server None Yes
Effect on the first paint None Can slow it
Cookies to disclose None from the button Sometimes
Works without JavaScript Yes No

6. Answering

The button only converts if the reply is quick. State your reply window on the site (“replies within one working day”, or “Mon to Sat, 10 am to 6 pm”) and set an away message in WhatsApp Business for the hours you are closed. A lead that waits a day for a first reply has usually messaged two competitors by then.

The contact card at the bottom of the zahidaramai.com home page, with a Reply within one working day badge, the WhatsApp number, opening hours and a Start on WhatsApp button
The contact card on my home page states the reply window and the hours right next to the WhatsApp button.

Set up three quick replies before you launch: a greeting that asks what they need, a reply with your prices or a link to them, and a reply that asks for the details you need to quote. Keep each reply short and in the customer’s language, whether that is English or Bahasa Malaysia. Use labels to mark each chat as new, quoted, won or lost, so the inbox doubles as a simple lead list.

Three example quick replies for a greeting, prices and the details needed to quote, above four chat labels: New, Quoted, Won and Lost
An example set of three quick replies and four labels to set up in WhatsApp Business before the buttons go live.

Common mistakes and how to fix them

  • Leading zero in the number. WhatsApp says the number is invalid and the enquiry is lost. Drop the zero and start with 60.
  • A plus sign or spaces in the link. Use digits only after wa.me/.
  • Raw spaces or ampersands in the message. Encode them, then retest on a phone.
  • One message everywhere. You lose the source of the lead. Use a different message per placement.
  • A personal number. When that person leaves, the leads go with them. Use a business number.
  • Floating button covering the content or the cookie notice. Move it, shrink it, or hide it on pages where it gets in the way.
  • Never testing on a real phone. Desktop and mobile behave differently; check both before launch.

Before launch, run these five tests on every page that has a button:

Test Passes when
Tap each button on a phone The chat opens with your business name
Read the chat box The whole message is there
Click a button on a laptop WhatsApp Web or the app opens
Scroll a page on a phone The floating button covers no text and no cookie notice
Tap, then open GA4 DebugView whatsapp_click arrives with the right placement

What this looks like on a real site

On my own site every page has a WhatsApp button with its own message, the home page shows my local time and whether I am open, the floating button appears only on phones and hides on the contact page, and every tap is counted with its placement. It is a small amount of work once, and it is the difference between knowing which pages bring clients and guessing.

The top of the zahidaramai.com home page with a WhatsApp Zahid header button, a Get a Quote on WhatsApp button and a line reading Kuala Lumpur, the local time, open now, WhatsApp me
The first screen of my home page: the header button, the hero button and the live Kuala Lumpur time with an open now note.

If your site also needs to be found, the buttons work best next to a good Google Business Profile and pages built for local searches such as web design in Kuala Lumpur.

If you would like the same on your site, it is part of every website I build; the service is described on the freelance web designer page and the prices on the pricing page. If you already have a site and only want the buttons and tracking set up, send the address on WhatsApp and I will quote it as a small job.

Questions

Questions readers ask

Do I need a plugin to add a WhatsApp button?

No. A WhatsApp button is a normal link to wa.me followed by your number in international format. Any button in WordPress, Elementor or plain HTML can point to it. Plugins add floating buttons and multiple agents, which some businesses want, but they also add scripts that slow the page.

Should I use my personal number or WhatsApp Business?

WhatsApp Business, on a number dedicated to the business. It gives you a profile with hours and address, quick replies, labels for leads, and an away message. The link format is the same.

Where should the button go?

Above the fold on the home page, at the end of every service and product description, in the header on phones, and as a floating button on mobile. Each one should carry a different pre-filled message so you know which page the enquiry came from.

Can I see how many people tap it?

Yes. Google Analytics 4 can record every tap as an event with the page and the button position, and Google Ads can count those taps as conversions. Without it you cannot tell which page earns its keep.

Let's get in touch

Need this done for your own website? 

I build and look after WordPress websites for businesses in Malaysia. Tell me about yours on WhatsApp and I will reply within one working day.

Reply within one working day

Message Zahid directly

WhatsApp
+60 11-5197 8879
Hours
Monday to Saturday 10 am to 6 pm · Sunday closed
Based in
Kuala Lumpur, Malaysia

Send three things for a quote in one reply

  1. 01Your current website, if you have one
  2. 02What the website must do for your business
  3. 03When you need it live
WhatsApp Zahid